2. From place $A$ to place $B$, two groups of tourists start simultaneously. The first group starts by bus, traveling at an average speed of $20 \mathrm{~km} / \mathrm{s}$ and reaches place $C$, which is halfway between $A$ and $B$, and then walks. The second group starts walking, and after 1 hour, they board a bus traveling at an average speed of $30 \mathrm{~km} / \mathrm{h}$. At place $C$, the first group arrives 35 minutes earlier than the second group, and at place $B$, the first group arrives 1 hour and 25 minutes later. How far apart are places $A$ and $B$, and what is the average walking speed of the groups, if the average walking speed of the first group is $1 \mathrm{~km} / \mathrm{h}$ greater than the average walking speed of the second group?
Solution. Let $x$ denote the average speed of the first group (when walking). Then the average speed of the second group (when walking) will be $y=x-1$. If we denote the distance between places $A$ and $B$ by $s$, then, from the conditions of the problem, we get:

$$
\begin{aligned}
& \frac{\frac{s}{2}}{20}+\frac{7}{12}=1+\frac{\frac{s}{2}(x-1)}{30} \\
& \frac{\frac{s}{2}}{x}=\frac{\frac{s}{2}}{30}+2
\end{aligned}
$$

from which we obtain $x_{1}=6, x_{2}=67.25, s_{1}=30, s_{2}=-215$.

Thus, the average speed of the first group (when walking) is $6 \mathrm{~km} / \mathrm{h}$, of the second group $5 \mathrm{~km} / \mathrm{h}$, and the distance between places $A$ and $B$ is $30 \mathrm{~km}$.