Answer
Find out the the rate of the boat in still water.
To proof
let us assume that the speed of the boat in the still water = u
let us assume that the speed of the current = v
Formula

As given
18 miles downstream for 3 hours
Now for the downstream

u + v = 6
now for the upstream
As given
the trip back against the current takes 6 hours

u-v = 3
Than the two equation becomes
u + v = 6 and u - v = 3
add both the above equation
we get
2u = 9
u = 4.5miles per hour
put this in the u - v = 3
4.5 -v = 3
v =1.5 miles per hour
The rate of the boat in the still water is 4.5miles per hour .
Hence proved