13.099. The distance between villages $A$ and $B$ is $s$ km. Two motorists left $A$ for $B$ simultaneously along the same road and were supposed to arrive in $B$ at the same time. In reality, the first motorist arrived in $B$ $n$ hours earlier than scheduled, while the second was $3n$ hours late, as the latter traveled on average $r$ km less per hour than the first. Determine the average speed of each motorist.
Solution.

Let $t$-time, $v_{1}$ and $v_{2}$-speeds; then $\frac{s}{v_{1}}=t-n$, (1) $\frac{s}{v_{2}}=t+3 n$,

(2) $v_{1}-v_{2}=r$. Subtracting (1) from (2), we get $s\left(\frac{1}{v_{2}}-\frac{1}{v_{1}}\right)=4 n \Rightarrow$ $\Rightarrow\left(v_{1}-v_{2}\right) s=4 n v_{1} v_{2} \Rightarrow v_{1} v_{2}=\frac{s r}{4 n}$. The solution to the system $\left\{\begin{array}{l}v_{1}+\left(-v_{2}\right)=r, \\ v_{1}\left(-v_{2}\right)=-\frac{s r}{4 n},\end{array}\right.$ are the roots $z_{1}=v_{1}$ and $z_{2}=-v_{2}$ of the quadratic equation $z^{2}-r z-\frac{s r}{4 n}=0$.

![](https://cdn.mathpix.com/cropped/2024_05_22_fa9db84b44b98ec0a5c7g-853.jpg?height=100&width=960&top_left_y=1244&top_left_x=96)

Answer: $\frac{n r+\sqrt{n r(n r+s)}}{2 n}$ and $\frac{-n r+\sqrt{n r(n r+s)}}{2 n}$.