Let x represent the speed of of boat.
We have been given that the river current is 3 miles per hour.
The speed of boat upstream will be [tex]x-3[/tex].
The speed of boat downstream would be [tex]x+3[/tex].
[tex]\text{Time}=\frac{\text{Distance}}{\text{Speed}}[/tex]
We have been given that you travel 2 miles downstream to a marina for supplies, and then you travel 3 miles upstream to a dock.
We can represent this information in an equation as:
[tex]\text{Time}=\frac{2}{x+3}+\frac{3}{x-3}[/tex]
Since the speed of the boat is 18 miles per hour, so we will substitute [tex]x=18[/tex] in above equation and solve for time.
[tex]\text{Time}=\frac{2}{18+3}+\frac{3}{18-3}[/tex]
[tex]\text{Time}=\frac{2}{21}+\frac{3}{15}[/tex]
[tex]\text{Time}=\frac{2}{21}+\frac{1}{5}[/tex]
[tex]\text{Time}=\frac{2\cdot 5}{21\cdot 5}+\frac{1\cdot 21}{5\cdot 21}[/tex]
[tex]\text{Time}=\frac{10}{105}+\frac{21}{105}[/tex]
[tex]\text{Time}=\frac{31}{105}[/tex]
[tex]\text{Time}=0.295238095[/tex]
Since time is in hours, so let us convert our given time in minutes.
1 hour = 60 minutes.
[tex]\text{Time}=0.295238095\times 60\text{ minutes}[/tex]
[tex]\text{Time}=17.7142857\text{ minutes}[/tex]
Rounding to nearest tenth of minute.
[tex]\text{Time}\approx 17.7\text{ minutes}[/tex]
Therefore, it will take approximately 17.7 minutes for the boat to take the trip.