When the boat goes upstream, the river is flowing in the opposite direction, so the water current reduces the boat's progress. (The boat is slowed because the water is pushing against it.)
When the boat goes downstream, the river is flowing in the same direction, so the water current increases the boat's progress. (The boat is pushed along by the water.)
The situation is similar to an airplane flying with the wind or against the wind. I'll show a quick example, using an airplane.
A plane flies 450 miles with the wind, and the trip takes three hours. On the return trip, the plane flies against the wind, and the trip takes five hours. What's the speed of the plane in still air, and what's the speed of the wind?
Let P = the plane's speed (without wind)
Let W = the wind's speed
We use the formula: Distance = Speed × Time
With the wind, the plane's progress is increased (because the wind helps push the plane), so we add the wind's speed to the plane's speed. That trip took 3 hr.
450 = 3(P + W)
Against the wind, the plane's progress is decreased (because the plane is fighting the wind), so we subtract the wind's speed from the plane's speed. That trip took 5 hr.
450 = 5(P - W)
This is a system of two equations. From here, there's more than one way to find P and W.
What method would you try, to find that the plane's speed (P) is 120mph and the wind's speed (W) is 30 mph? You can set up and solve your exercise similarly.
?
EDIT: Changed 'speed' to 'progress' in some places