A boat travels upstream from B to A and downstream from A to B in 3 hours. If the speed of the boat in still water is 9km/hr and the speed of the current is 3km/hr, the distance A and B is:_______?

A boat travels upstream from B to A and downstream from A to B in 3 hours. If the speed of the boat in still water is 9km/hr and the speed of the current is 3km/hr, the distance A and B is:_______?

A. 4km
B. 6 km
C. 8 km
D. 12 km
Explanation:
Speed downstream = (9+3) km/hr = 12km/hr
Speed upstream = (9-3) km/hr = 6 km/hr
Distance AB = x km
x/6 + x/12 = 3
=> 2x + x = 36
=> x= 12