Derivatives and application Pythagorean: A river is 20km wide....

Question 1: A river is 20km wide. You want to 38km downstream the opposite side of the river. If you can run 9km per hour and can swim 3km per hour.
a) Set up a time function
b) What is the least amount of time in which you can reach B? Answer : swim 21.2 km, walk 30.9km T=10.5

I don't know how to set up this question at all- I tried one way and didn't get the answer. The question kinda confuses me

Can I ask another question here as well? It's similar to the one above and I'm having the same problem of not knowing how to set it up.

Question 2: A man rowboat 2km from the nearest point on a straight shoreline wishes to reach his house 6km further down the shore. If he can row at a rate of 3km/h and walk at a rate of 5 km/h, how should he proceed in order to arrive at his house in the shortest amount of time?Answer: Walk 4.5 km, Row: 2.5km

Re: Derivatives and application Pythagorean: A river is 20km wide....

20 km wide? That is one heck of a river! The Amazon is about 10 km wide at its mouth and the Nile River is about 7.5 km wide near its delta. The Mississippi, on the other hand, is a piker, at about 1.6 km width.