Let us assume the speed of the 1st boat is b, the 2 nd boat is s, and the river's speed is r. Let ' d ' be the distance between A and B. ‌⇒d=2(b+r) and d=3(b−r) ‌⇒b+r=d/2 and b−r=d/3⇒r=d/12(subtracting both equations). Now, it is given that ‌‌
d
s+r
+‌
d
s−r
=6 ⇒‌‌
d
s+‌
d
12
+‌
d
s−‌
d
12
=6 ⇒‌2ds=6(s2−‌
d2
144
) ⇒‌144s2−48ds−d2=0 Solving the quadratic equation, we get: ‌s=d(‌