Final answer:
The speed of the boats in still water is 40 km/h.
Step-by-step explanation:
In order to determine the speed of the boats in still water, we can use the concept of relative velocity.
Let's denote the speed of each boat in still water as v, and the speed of the current as c.
When one boat travels upstream, its effective speed is reduced by the speed of the current, so its speed relative to the ground is v - c.
Similarly, when the other boat travels downstream, its effective speed is increased by the speed of the current, so its speed relative to the ground is v + c.
We can set up two equations: v - c = 24 and v + c = 56.
We can then add the two equations together to eliminate the variable c:
(v - c) + (v + c) = 24 + 56, or 2v = 80.
Dividing both sides of the equation by 2, we find that v = 40.
Therefore, the speed of the boats in still water is 40 km/h.