2. A truck traveling at $60 \mathrm{~km} / \mathrm{h}$ started from city $A$ to city $B$. After some time, a car traveling at $90 \mathrm{~km} / \mathrm{h}$ also started from city $A$ to city $B$. It was planned for the car to catch up with the truck in city $B$. However, after covering $\frac{2}{3}$ of the distance, the truck had to reduce its speed to $30 \mathrm{~km} / \mathrm{h}$ (due to a malfunction). As a result, the car caught up with the truck $50 \mathrm{~km}$ before city $B$. Determine the length of the road between cities $A$ and $B$.
Solution. Let the distance between the two cities be $x \mathrm{~km}$.

If the truck had traveled the entire distance at $60 \mathrm{~km} / \mathrm{h}$, it would have taken $\frac{x}{60}$ hours to reach city $B$. However, it traveled the first $\frac{2}{3}$ of the distance, $\frac{2}{3} x$, at a speed of $60 \mathrm{~km} / \mathrm{h}$, and the remaining part (up to the meeting point) $\frac{1}{3} x-50$ at a speed of $30 \mathrm{~km} / \mathrm{h}$. Thus, up to the meeting point, it took $\frac{2}{3} \cdot \frac{x}{60}+\frac{\frac{1}{3} x-50}{30}$ hours. On the other hand, the car was supposed to catch up with the truck after $\frac{x}{90}$ hours from the start. However, it arrived after $\frac{x-50}{90}$ hours. This means it arrived $\frac{50}{90}$ hours earlier than expected.

From the above discussion, we get the equation

$$
\frac{x}{60}-\left(\frac{2}{3} \cdot \frac{x}{60}+\frac{\frac{1}{3} x-50}{30}\right)=\frac{50}{90}
$$

whose solution is $x=200$. Therefore, the distance from $A$ to $B$ is $200 \mathrm{~km}$.