13.405 Two pedestrians set out simultaneously from A to B and from B to A. When the first had walked half the distance, the second had 24 km left to walk to the end, and when the second had walked half the distance, the first had 15 km left to walk to the end. How many kilometers will the second pedestrian have left to walk after the first completes the transition?
Solution. Let $x$ be the distance between A and B, $y$ be the ratio of the speeds of the first and second pedestrians. Then
$\left(\frac{x}{2}\right):(x-24)=y,(x-15):\left(\frac{x}{2}\right)=y$, from which $\frac{x}{2(x-24)}=\frac{2(x-15)}{x} \Rightarrow x=40$ (the value $x=12$ is not suitable, as $x>24) \Rightarrow y=\frac{5}{4}$. Therefore, if the first pedestrian walks 40 km, the second pedestrian will walk 32 km.

Answer: 8 km.