13.161. The cost of transporting a ton of cargo from point $M$ to point $N$ by rail is $b$ rubles more expensive than by water. How many tons of cargo can be transported from $M$ to $N$ by rail for $a$ rubles, if by water the same amount can transport $k$ tons more than by rail?
## Solution.

Let $x$ tons of cargo can be transported by railway, $(x+k)$ tons by waterway. The cost of transporting one ton of cargo by railway is $\frac{a}{x}$ rubles, by waterway $-\frac{a}{x+k}$ rubles. According to the condition, $\frac{a}{x}-\frac{a}{x+k}=b$, from which

$$
\begin{aligned}
x= & \frac{-b k+\sqrt{b^{2} k^{2}+4 a b k}}{2 b} \text { tons. } \\
& \text { Answer: } \frac{-b k+\sqrt{b^{2} k^{2}+4 a b k}}{2 b} \text { tons. }
\end{aligned}
$$