total time = 4 hours
Upstream = 15 km/h
downstream = 25 km/h
The disatance is the same
speed = distance / time
solve for distance
distance = speed x time
total distance = distance upstream + distance downstrem
4(average speed) = 15(first time) + 25(second time)