Let's define
r: speed of the river
By definition:
speed = distance/time
The speed of the boat depends on the boat's own speed and the speed of the river. Then upstream:
6 - r= 5/t
or
t = 5/(6 - r)
and downstream:
6 + r= 10/t
or
t = 10/(6 + r)
It takes them the same amount of time to go upstream as it does to go downstream, then:
[tex]\begin{gathered} \frac{5}{6-r}=\frac{10}{6+r} \\ 5\cdot(6+r)=10\cdot(6-r) \\ 30+5r=60-10r \\ 5r+10r=60-30 \\ 15r=30 \\ r=\frac{30}{15} \\ r=2 \end{gathered}[/tex]The speed of the river is 2 kilometers per hour