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
.
The speed of boat downstream would be
.
![\text{Time}=\frac{\text{Distance}}{\text{Speed}}](https://img.qammunity.org/2021/formulas/mathematics/middle-school/a2l4re6nbbh9cnvpqhskispmk2h6qzd0k6.png)
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:
![\text{Time}=(2)/(x+3)+(3)/(x-3)](https://img.qammunity.org/2021/formulas/mathematics/middle-school/2p78ep99r5g9d8w7w0yn002ydw5bbrjpja.png)
Since the speed of the boat is 18 miles per hour, so we will substitute
in above equation and solve for time.
![\text{Time}=(2)/(18+3)+(3)/(18-3)](https://img.qammunity.org/2021/formulas/mathematics/middle-school/7p54ajv17l7rs5cyewxmqa87y6y4ndre4v.png)
![\text{Time}=(2)/(21)+(3)/(15)](https://img.qammunity.org/2021/formulas/mathematics/middle-school/w69c7xg8ubpsixvztgboyj3bxt2di72ug2.png)
![\text{Time}=(2)/(21)+(1)/(5)](https://img.qammunity.org/2021/formulas/mathematics/middle-school/wirpmgk8e6az9oz26r187ii54h0g4v55wb.png)
![\text{Time}=(2\cdot 5)/(21\cdot 5)+(1\cdot 21)/(5\cdot 21)](https://img.qammunity.org/2021/formulas/mathematics/middle-school/n5oo79liwsxc8hmq9miyp97otbiyjqve1u.png)
![\text{Time}=(10)/(105)+(21)/(105)](https://img.qammunity.org/2021/formulas/mathematics/middle-school/fgaoo24cn1fw78bz21816uc5ynh0jsp7kg.png)
![\text{Time}=(31)/(105)](https://img.qammunity.org/2021/formulas/mathematics/middle-school/6dks2ugbreb52ck7eqipiid7y3qvs9kium.png)
![\text{Time}=0.295238095](https://img.qammunity.org/2021/formulas/mathematics/middle-school/spcurll6nu3er5d0awec5f8lag4yrkzagn.png)
Since time is in hours, so let us convert our given time in minutes.
1 hour = 60 minutes.
![\text{Time}=0.295238095* 60\text{ minutes}](https://img.qammunity.org/2021/formulas/mathematics/middle-school/339qhbv62p5lxx61krrwk99rhyaqzq9btl.png)
![\text{Time}=17.7142857\text{ minutes}](https://img.qammunity.org/2021/formulas/mathematics/middle-school/xc73p6ijyjkmaf18aqqekdtn40ytbcjo0m.png)
Rounding to nearest tenth of minute.
![\text{Time}\approx 17.7\text{ minutes}](https://img.qammunity.org/2021/formulas/mathematics/middle-school/mkzd1xe2gpgh9czpglf0t02joxl9mvvf23.png)
Therefore, it will take approximately 17.7 minutes for the boat to take the trip.