Let the speed of the boat be B. Let the speed of the water be W.
When the boat goes against the current upstream the combined speed is B-W and when the boat goes with the current downstream it's B+W. (distance)=(speed)(time) so (time)=(distance)/(speed). These quantities are equal so we can write 9/(B-W)=15/(B+W). Cross multiply: 9(B+W)=15(B-W), so 9B+9W=15B-15W; 24W=6B so W=B/4. Plug in B=16mph and we get W=4mph.
CHECK: Time to go upstream=9/12=time to go downstream=15/20. Both fractions are 3/4. So it checks out (3/4 hr).