Folklore

Petya was traveling from Petrov to Nikolayev, while Kolya was going in the opposite direction. They met when Petya had traveled 10 km and another quarter of the remaining distance to Nikolayev, and Kolya had traveled 20 km and a third of the remaining distance to Petrov. What is the distance between Petrov and Nikolayev?
The first method. Let Petya have driven $10 + x$ km to the meeting point, then he had $3x$ km left to Nikolayev. Kolya drove $20 + y$ km to the meeting point, and he had $2y$ km left to Petrovo (see the figure).

![](https://cdn.mathpix.com/cropped/2024_05_06_fe32e688207a541a0cbdg-12.jpg?height=120&width=614&top_left_y=2221&top_left_x=722)

Expressing the lengths of segments $PV$ and $NV$ in two ways, we form the system: $\left\{\begin{array}{l}x+10=2 y, \\ y+20=3 x\end{array}\right.$. Solving it, we get $x = y = 10$. Therefore, the distance between Petrovo and Nikolayev is $10 + 4x = 50$ (km).

The second method. Let $S$ km be the desired distance. Then, before the meeting, Petya drove $10 + 1/4(S - 10)$ km, and Kolya drove $20 + 1/3(S - 20)$ km. Therefore, $10 + 1/4(S - 10) + 20 + 1/3(S - 20) = S$. Solving the equation, we get $S = 50$.

The third method. Let Petya, after driving 10 km, be at point $A$, and Kolya, after driving 20 km, be at point $B$. Then, before the meeting, Petya drove a quarter of segment $AB$ and another 5 km from $A$, and Kolya drove a third of $AB$ and another $10/3$ km from $B$. Thus, $5 + 10/3 = 25/3$ km make up $1 - 1/3 - 1/4 = 5/12$ of segment $AB$.

Therefore, $AB = 12/5 \cdot 25/3 = 20$ km, and the entire distance is $20 + 30 = 50$ km.