\section*{Task 1 - 211011}

A traveler covered the first part of a business trip by car and the rest by train.

When he had driven the car part of the journey and exactly one fifth of the train part, he realized that at that point he had covered exactly one third of the total distance. Later, when he had covered exactly half of the total distance, he had already traveled \(20 \mathrm{~km}\) more by train than he had previously by car.

How long was the total distance of this trip?
}

Let the distance covered by car be \(x \mathrm{~km}\), and the distance covered by train be \(y \mathrm{~km}\). The total distance was then \((x+y) \mathrm{km}\) long, and it holds that

\[
x+\frac{y}{5}=\frac{x+y}{3} \quad(1) \quad \text { and } \quad \frac{x+y}{2}=x+(x+20)
\]

From (1) it follows that

\[
15 x+3 y=5 x+5 y \quad ; \quad y=5 x
\]

from (2) it follows that

\[
x+y=2 x+2 x+40 \quad ; \quad y=3 x+40
\]

By equating the right sides of (3) and (4), we get \(5 x=3 x+40\) and from this \(x=20\). From (3) it follows that \(y=100\).

The traveler therefore covered \(20 \mathrm{~km}\) by car and \(100 \mathrm{~km}\) by train, so the total distance was \(120 \mathrm{~km}\).