A passenger train traveling from $A$ to $B$ has a speed of $60 \mathrm{~km} / \mathrm{h}$. The train, which departs later, is a fast train with a speed of $120 \mathrm{~km} / \mathrm{h}$ and must catch up to the passenger train at $B$. After covering $2 / 3$ of its journey, the passenger train continues at half its original speed and is caught by the fast train 80 kilometers before $B$. How far is $A$ from $B$?
The express train departs when the passenger train is halfway through its journey. Therefore, by the time the passenger train has covered $2 / 3$ of the route, the express train has covered $1 / 3$ of the route. If we denote the distance $A B$ as $3 s$, then we can write:

$$
\frac{2 s-80}{120}=\frac{s-80}{30}
$$

From this, the distance $A B$ is found to be $360 \mathrm{~km}$.