if the boat travels 60 km in 8 hours, the rate it travels upstream is then 60/8 km/hr, or 15/2 km/hr. if the river is traveling against it at 4 km/hr, it subtracts from the boats max speed by 4 km/hr, and 15/2 + 4 or 23/2 km/hr is then the boats speed in still water.