Answer
Boat: $14$ mi/h
Water: $6$ mi/h
Work Step by Step
Speed is the ratio of distance and the time ,$v=\displaystyle \frac{d}{t}$.
From $v=\displaystyle \frac{d}{t}$it follows that $d=vt\qquad (*)$
Let $v$ be the speed of the boat in still water.
Let $w $ be the speed of the water current.
When sailing against the current, the speed is $ v-w$
and time spent is $t=$2.5 h.
So, we have by (*)
$20=2.5(v-w)$
When sailing with the current, the speed is $ v+w$
The time is $t=1$h
So, we have by (*)
$20=1(v+w)$
$\left\{\begin{array}{ll}
20=2.5v-2.5w & \\
20=v+w & /\times 2.5
\end{array}\right.$
(we are solving by elimination, eliminating w)
$\left\{\begin{array}{ll}
20=2.5v-2.5w & \\
50=2.5v+2.5w & /add
\end{array}\right.$
$70=5v\qquad/\div 5$
$14=v$
$v=14$ mi/h
Back-substitute:
$20=v+w$
$20=14+w\qquad/-14$
$6=w$
w= $6$ mi/h