Speed of the boat upstream = 9-3 \(=\) \(\frac{6km}{hr}\)
Speed of the boat downstream = 9+3 \(=\) \(\frac{12km}{hr}\)
Let the distance between A and B be x kms.
So,time taken to travel x km upstream by boat \(=\) \(\frac{x}{6hrs}\)
And time taken to travel x kms downstream \(=\frac{x}{12hrs}\)
According to the question,
\(\frac{x}{6}+\frac{x}{12}=3\)
\(x[\frac{1}{6}+\frac{1}{12}]=3\)
x = 4×3 =12
So, distance between A and B is 12 kms.
So the correct option is (D)