Concept:When a boat moves downstream, the current adds to its speed; upstream, the current reduces its speed.Explanation:Let the distance between A and B be d km.Downstream speed from A to B = 9+3=12 km/h.Upstream speed from B to A = 9−3=6 km/h.Total time for both journeys is 3 h.Therefore, 12d​+6d​=3.Multiplying by 12: d+2d=36.So, 3d=36.Hence, d=12 km.Answer:The distance between A and B is 12 km (Option D).