b = speed of the boat in still water
c = speed of the current
when going Upstream, the boat is not really going "b" fast, is really going slower, is going "b - c", because the current is subtracting speed from it, likewise, when going Downstream the boat is not going "b" fast, is really going faster, is going "b + c", because the current is adding its speed to it.
We also know it took 2 hours Upstream as well as Downstream, and we also know how far it went, so
![{\Large \begin{array}{llll} \underset{distance}{d}=\underset{rate}{r} \stackrel{time}{t} \end{array}} \\\\[-0.35em] ~\dotfill\\\\ \begin{array}{lcccl} &\stackrel{km}{distance}&\stackrel{mph}{rate}&\stackrel{hours}{time}\\ \cline{2-4}&\\ Upstream&58&b-c&t\\ Downstream&90&b+c&t \end{array}\hspace{5em} \begin{cases} 58=(b-c)(2)\\\\ 90=(b+c)(2) \end{cases} \\\\[-0.35em] ~\dotfill](https://img.qammunity.org/2024/formulas/mathematics/college/9rioe1c8azgh9tawe0qv3b0ttlyzaowlpm.png)
