From city $A$ to city $B$, a car, a motorcyclist, and a cyclist start at the same time. Upon reaching $B$, the car immediately turns back and heads for $A$ along the same route, and meets the motorcyclist $a \mathrm{~km}$ from $B$, and then meets the cyclist $b \mathrm{~km}$ from $B$. The motorcyclist also immediately turns back from $B$ towards $A$ and meets the cyclist $c \mathrm{~km}$ from $B$.

Calculate the distance between $A$ and $B$. (Assume that each movement is uniform.)
Let the speeds of the car, motorcycle, and bicycle be denoted by $v_{1}$, $v_{2}$, and $v_{3}$ respectively, where clearly $v_{1}>v_{2}>v_{3}>0$. Let the time elapsed from the common start to the respective encounters be denoted by $t_{1}$, $t_{2}$, and $t_{3}$, and the distance between $A$ and $B$ by $s$. According to the text, the driver of the car, turning back from $B$, meets the motorcyclist first, closer to $B$, and only then the cyclist. Furthermore, the cyclist heading towards $B$ meets the car driver before the motorcyclist.

![](https://cdn.mathpix.com/cropped/2024_05_02_6b261caacce00544e735g-1.jpg?height=469&width=631&top_left_y=351&top_left_x=736)

Thus, the distances $a$, $b$, and $c$ must satisfy the inequalities

$$
b>a>0 \quad \text{and} \quad b>c>0
$$

We seek the solution to the problem only for parameter values that satisfy these inequalities from the outset.

Express the distances traveled by the meeting parties up to each encounter:

$$
\begin{array}{lll}
v_{1} t_{1}=s+a, & v_{1} t_{2}=s+b, & v_{2} t_{3}=s+c \\
v_{2} t_{1}=s-a, & v_{3} t_{2}=s-b, & v_{3} t_{3}=s-c
\end{array}
$$

Taking the ratio of the left and right sides of the equations written one below the other, we get
(2) $\frac{v_{1}}{v_{2}}=\frac{s+a}{s-a}$,
$\frac{v_{1}}{v_{3}}=\frac{s+b}{s-b}$
(4) $\frac{v_{2}}{v_{3}}=\frac{s+c}{s-c}$.

The ratio of the left sides of (3) and (4) is equal to the left side of (2), so the same must hold for the corresponding right sides:

$$
\frac{(s+b)(s-c)}{(s-b)(s+c)}=\frac{s+a}{s-a}
$$

From this, by the usual rearrangement steps, we get

$$
s^{2}=\frac{a b c}{a+c-b}
$$

and the distance between cities $A$ and $B$ is

$$
A B=s=\sqrt{\frac{a b c}{a+c-b}}
$$

provided that the following condition is also satisfied for the given distances

$$
a+c-b>0
$$

The $s$ determined by (5) is a solution to the problem if it satisfies the obviously necessary conditions for $s$, that is, if $s$ is greater than each of $a$, $b$, and $c$, that is,

$$
s^{2}=\frac{a b c}{a+c-b}>a^{2}, \quad \frac{a b c}{a+c-b}>b^{2}, \quad \frac{a b c}{a+c-b}>c^{2}
$$

For the second one, based on (6), the following must hold:

$$
a c>a b+b c-b^{2}
$$

rearranging,

$$
(b-c)(b-a)>0
$$

This holds based on (1), and then the other two conditions of (7) are also satisfied.

According to this, (1) and (6) being satisfied is sufficient for (5) to be a real (realistic) solution to the problem.