.
Let u be the boat speed in still water (in kilometers per hour, km/h).
Then the boat's effective speed downstream is u+3 km/h,
while the boat's effective speed upstream is u-3 km/h.
// It is the first major point you need understand and use in this sort of problems.
Now, distance traveled downstream is 5*(u + 3) (distance = time*effective speed downstream).
Next, distance traveled upstream is 8*(u - 3) (distance = time*effective speed upstream)
Distance is the same; so you have this equation
5*(u + 3) = 8*(u - 3).
// It is second major point you need understand and use to get the equation.
Simplify and solve for "u" :
5u + 15 = 8u - 24
15 + 24 = 8u - 5u
39 = 3u ====> u = 39/3 = 13 km/h.
Thus you just found the boat' speed in still water. It is 13 kilometers per hour.