Question 984754
ship speed=x
current speed=4 kph
The distance is (x+4)*20, units in km.
It is also ((x-4)*25.
Those two are equal.
;
(x+4)*20=(x-4)*25
20x+80=25x-100
-5x=-180
x=36 km/h
;
The speed is 40 km/h downstream *20 hours or 800 km.
Upstream, the speed is 32 km/h*25 hours or 800 km. 

800 km is the distance.