Hello, ihmth!

There is a back-door approach to this problem,

. . involving optics and striaght-line paths.

But I'll use the expected Calculus set-up.

1) A ship lies 6 mi. from shore.

Opposite a point 10 mi. farther along the shore another ship lies 18 mi. offshore.

A boat from the first ship is to land a passenger and then proceed to the other ship.

What is the least distance the boat can travel? Code:

* C
* |
* |
* |
A * * |
| * * | 16
| * * |
6 | * * |
| * * |
| * * |
B * - - - - - * - - - - - - - - - * D
x P 10 - x

The first ship is $\displaystyle A\!:\;AB = 6$

The second ship is at $\displaystyle C\!:\;CD = 16$

And: .$\displaystyle BD = 10$

Let $\displaystyle P$ be the landing point.

Then: .$\displaystyle BP \:=\: x\:\text{ and }\:PD \:=\:10-x$

In right triangle $\displaystyle ABP\!:\;\;AP \:=\:\sqrt{x^2 + 6^2}$

In right triangle $\displaystyle CDP\!:\;\;CP \:=\:\sqrt{(10-x)^2 + 18^2} $

The distance travelled is: .$\displaystyle D \;=\;\left(x^2+36\right)^{\frac{1}{2}} + \left(x^2-20x+424\right)^{\frac{1}{2}}$

. . and **that** is the function we must minimize.