Keith B. answered 08/01/19
Mech. Engineer, Professional Tutor — ACT/SAT Prep, Math, STEM Subjects
Visualize this problem in your head: the river is flowing at 5 km/h while a boat is traveling both upstream and downstream, we can define the speed of the boat as "S" (km/h), and label the flow of the river as "F" = 5 (km/h). When the boat is traveling downstream, the flow of the river is working in the same direction with the boat to make it travel much faster than its typical speed, when the boat is traveling upstream, the flow of river is working in the opposite direction with the boat to make it travel much slower than its typical speed (this is similar to how if you walk WITH an escalator you will move faster than stairs, and if you walk AGAINST an escalator you will travel considerably slow).
We can define two sides of an equation as follows
Let HD = 3 Hours (h)
Let Hu = 4 Hours (h)
Let S = Speed of Boat (km/h)
Let F = Flow of River (km/h)
Let DD = Distance Traveled Downstream (km)
Let DU = Distanced Traveled Upstream (km)
DD = (HD)*(F)+(HD)*(S)
DU = (HU)*(F)-(HU)*(S) Note: you subtract the speed when traveling upstream because it opposes the direction of flow
DD = DU + 5
Now all you need to do is plug in your values
(HD)*(F)+(HD)*(S) = (HU)*(F)-(HU)*(S) + 5
(3 hours) * (5 km/hour) + (3 hours) * S = (4 hours) * (5 km/hour) - (4 hours) * S + 5
15 + 3S = 20 - 4S + 5
Simplify this further
3S = 5 - 4S + 5
3S = 10 - 4S
7S = 10
Therefore, S = 10/7 = 1.42 (km/hour)
Remember to check your answer to ensure it is correct:
DD = (HD)*(F)+(HD)*(S) = (3 hours) * (5 km/hour) + (3 hours) * (1.42 km/hour) = 19.28km
DU = (HU)*(F)-(HU)*(S) = (4 hours) * (5 km/hour) - (4 hours) * (1.42 km/hour) = 14.28km
19.28 km is 5km more than 14.28km, therefore our value for speed is correct.