There are two unknown quantities that we have to find. In order to work with them, we have to give them temporary names. Lets call the speed of the boat ' B ', and lets call the speed of the current ' C ' .
-- "Downstream", the current is helping the boat. The boat sails past the trees at a speed of (B + C).
(Distance) / (Speed) = Time
(20 miles) / (B + C) = 1 hour
Multiply each side by (B+C), then divide by 1 hr: 20 mi/1 hr = B + C
-- "Upstream" the boat is going against the current. It sails past the trees at a speed of (B - C).
(Distance) / (Speed) = Time
(20 miles) / (B - C) = 2.5 hours
Multiply each side by (B-C), then divide by 2.5 hr: 20 mi/2.5 hr = B - C
We're in good shape now. We have 2 equations in 2 unknowns:
B + C = 20
B - C = 8
Add the two equations, and you get 2B = 28. So B = 14 mph
Subtract the two equations and you get 2C = 12. So C = 6 mph
The speed of the boat is 14 mph .
The speed of the current is 6 mph .