The time is taken by the boat to cover upstream distance \(=6\) hours
Formula used:
Upstream speed \(=u-v\)
Downstream speed \(=u+v\)
Where,
\(\mathrm{u}\), is the speed of the boat
\(v\), is the speed of the stream
Speed \(=\frac{\text { Distance }}{\text { Time }}\)
Calculation:
The upstream speed,
\[
\begin{aligned}
&\Rightarrow \mathrm{u}-\mathrm{v}=\frac{240}{6} \\
&\Rightarrow \mathrm{u}-\mathrm{v}=40 \mathrm{kmph} \quad-(1)
\end{aligned}
\]
The downstream speed,
\[
\begin{aligned}
&\Rightarrow \mathrm{u}+\mathrm{v}=\frac{240}{3} \\
&\Rightarrow \mathrm{u}+\mathrm{v}=80 \mathrm{kmph} \quad-(2)
\end{aligned}
\]
On subtracting the equation (1) from equation (2), we get,
\[
\begin{aligned}
&\Rightarrow 2 \mathrm{v}=40 \\
&\Rightarrow \mathrm{v}=20 \mathrm{kmph}
\end{aligned}
\]
The speed of the stream \(=20 \mathrm{kmph}\)
\(\therefore\) The speed of the stream is \(20 \mathrm{kmph}\).