2. A person travels by boat along the river Drim from Struga to Globocica and back. The distance between Struga and Globocica is $18 \mathrm{~km}$, and he traveled in total 5 hours. What is the speed of the river Drim, if the person traveled $4 \mathrm{~km}$ downstream and $2 \mathrm{~km}$ upstream in the same time?
Solution. Let the speed of the river be $x \mathrm{~km} / \mathrm{h}$, and the speed of the boat in still water be $y \mathrm{~km} / \mathrm{h}$. From the condition of the problem, it follows that

$$
\frac{18}{y+x}+\frac{18}{y-x}=5 \quad \text { and } \quad \frac{4}{y+x}=\frac{2}{y-x}
$$

Let $\frac{1}{y+x}=u, \frac{1}{y-x}=v$. Then we obtain the system of equations

$$
\left\{\begin{array}{l}
18 u+18 v=5 \\
4 u=2 v
\end{array}\right.
$$

Its solution is $u=\frac{5}{54}, v=\frac{5}{27}$. According to this, we obtain the system

$$
\left\{\begin{array}{l}
x+y=\frac{54}{5} \\
x-y=\frac{27}{5}
\end{array}\right.
$$

i.e., $x=2.7 \mathrm{~km} / \mathrm{h}, y=8.1 \mathrm{~km} / \mathrm{h}$. Therefore, the speed of the river Drim is $2.7 \mathrm{~km} / \mathrm{h}$.