5. Two trains departed simultaneously from points $A$ and $B$ towards each other. It is known that they met at 14:00 and, without changing their speeds, continued their journey. One train arrived at point $B$ at 18:00, and the other train arrived at point $A$ at 23:00. At what time did the trains depart on their journey
Answer: 8:00.

Solution. Let the trains departed $t$ hours before the moment of meeting, and let $v_{1}$ be the speed of the first train, $v_{2}$ be the speed of the second. Then the first train traveled a distance of $t v_{1}$ from point $A$ to the meeting point with the second train, and the second train traveled this same distance (after meeting the first train) in 9 hours, so $t v_{1}=9 v_{2}$. Similarly, the second train traveled a distance of $t v_{2}$ from point $B$ to the meeting point, and the first train then traveled this distance in 4 hours, so $t v_{2}=4 v_{1}$. Multiplying these two equations, we get

$$
t v_{1} \cdot t v_{2}=9 v_{2} \cdot 4 v_{1} \quad \Rightarrow \quad t^{2}=36 \quad \Rightarrow \quad t=6
$$

Thus, the trains departed 6 hours before $14:00$, i.e., at 8:00.