5. A boat departed downstream from pier A. At the same time, a motorboat departed upstream from pier B towards the boat. After some time, they met. At the moment of their meeting, a second boat departed downstream from A and after some time met the motorboat. The distance between the points of the first and second meetings is $\frac{20}{81}$ of AB. The speeds of the current, boats, and motorboat are constant (the speeds of the boats are the same), and the ratio of the boat's own speed to the motorboat's own speed is $1: 5$. What part of the distance $A B$ did the motorboat cover by the time it met the second boat?

Answer. $\frac{56}{81}$ or $\frac{65}{81}$.
Let $S$ be the distance between the piers, $u$ be the speed of the current, $v$ be the own speed of the boat, and $5v$ be the own speed of the motorboat. Then the speeds of the boat and the motorboat on the river are $V_{n} = v + u$ and $V_{k} = 5v - u$, respectively. The first meeting occurred after time $t_{1} = \frac{S}{V_{n} + V_{k}} = \frac{S}{6v}$. During this time, the first boat traveled a distance $S_{1} = V_{n} t_{1} = \frac{S(v + u)}{6v}$ from pier $A$. The second meeting occurred after $t_{2} = \frac{S_{1}}{V_{n} + V_{k}} = \frac{S(v + u)}{36v^2}$ from the first meeting. During this time, the motorboat traveled a distance $d = V_{k} t_{2} = \frac{S(v + u)(5v - u)}{36v^2}$. According to the problem, $d = \frac{20}{81} AB$, i.e.,

$$
\frac{S(v + u)(5v - u)}{36v^2} = \frac{20}{81} S \Leftrightarrow 9(v + u)(5v - u) = 80v^2 \Leftrightarrow 35v^2 - 36uv + 9u^2 = 0 \Leftrightarrow (5v - 3u)(7v - 3u) = 0
$$

Thus, $u = \frac{7v}{3}$ or $u = \frac{5v}{3}$. The distance traveled by the motorboat by the second meeting is $L = V_{k} t_{1} + d = \frac{S(5v - u)}{6v} + \frac{20S}{81}$. In the first case, we get $L = \frac{56S}{81}$, and in the second case, $L = \frac{65S}{81}$.