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

Answer. $\frac{161}{225}$ or $\frac{176}{225}$.
Let $S$ be the distance between the piers, $u$ be the speed of the current, $2v$ be the own speed of the motor boat, and $3v$ be the own speed of the motorboat. Then the speeds of the boat and the motorboat on the river are $V_{n}=2v+u$ and $V_{\kappa}=3v-u$, respectively. The first meeting occurred after time $t_{1}=\frac{S}{V_{n}+V_{k}}=\frac{S}{5v}$. During this time, the first motorboat moved away from pier B by a distance of $S_{1}=V_{k} t_{1}=\frac{S(3v-u)}{5v}$. The second meeting occurred after $t_{2}=\frac{S_{1}}{V_{\text{л}}+V_{\mathrm{k}}}=\frac{S(3v-u)}{25v^{2}}$ from the first meeting. During this time, the motor boat traveled a distance of $d=V_{n} t_{2}=\frac{S(2v+u)(3v-u)}{25v^{2}}$. According to the condition, $d=\frac{56}{225} AB$, i.e., $\frac{S(2v+u)(3v-u)}{25v^{2}}=\frac{56}{225} S \Leftrightarrow 9(2v+u)(3v-u)=56v^{2} \Leftrightarrow 2v^{2}-9uv+9u^{2}=0 \Leftrightarrow (2v-3u)(v-3u)=0$.

Thus, $u=\frac{2v}{3}$ or $u=\frac{v}{3}$. The distance traveled by the motor boat to the second meeting moment is $L=V_{\text{л}} t_{1}+d=\frac{S(2v+u)}{5v}+\frac{56S}{225}$. In the first case, we get $L=\frac{161S}{225}$, and in the second case, $L=\frac{176S}{225}$.