The equation of the boat upstream is 20-s.
The equation downstream is 20+s.
Where s is the speed of the current.
Then, we know that the time spent is equal in both cases, and we also know that time equals distance divided by the speed. So, we express the following.
Solve for s.
Therefore, the speed of the current is 4 miles per hour.