Hello, scherz0!

I had difficulty reading some of the data.

I hope I got it right . . .

Ship $\displaystyle A$ looks northeast and sees ship $\displaystyle B$ 5 km away.

Ship $\displaystyle A$ is moving east at 5 km/hr; ship $\displaystyle B$ is moving south at 4 km/hr.

When will they be at their closest?

At the very beginning, the diagram looks like this: Code:

* Q
* |
* |
* |
5 * | 5√2/2
* |
* |
* 45° |
P * - - - - - - - * R
5√2/2

Ship $\displaystyle A$ is at $\displaystyle P$; ship $\displaystyle B$ is at $\displaystyle Q.\quad PQ \:=\: 5,\;PR \:=\: \tfrac{5\sqrt{2}}{2},\;QR \:=\: \tfrac{5\sqrt{2}}{2}$

Code:

* Q
* |
* | 4t
* |
5 * * B
* * |
* * | 5√2/2-4t
* * |
P * - - - * - - - * R
5t A 5√2/2-5t

In $\displaystyle t$ hours, ship $\displaystyle A$ has moved $\displaystyle 5t$ km to point $\displaystyle A.\quad AR \:=\:\tfrac{5\sqrt{2}}{2} - 5t$

In the same $\displaystyle t$ hours, ship $\displaystyle B$ has move $\displaystyle 4t$ km to point $\displaystyle B.\quad BR \:=\:\tfrac{5\sqrt{2}}{2} - 4t$

Their distance is given by: .$\displaystyle D \;=\;AB^2 \;=\;\left(\tfrac{5\sqrt{2}}{2} - 5t\right)^2 + \left(\tfrac{5\sqrt{2}}{2} - 4t\right)^2$

. . which simplifies to: .$\displaystyle D \;=\;41t^2 - 45\sqrt{2}t + 25$

Differentiate and equate to zero: .$\displaystyle 82t - 45\sqrt{2} \:=\:0 \quad\Rightarrow\quad t \:=\:\frac{45\sqrt{2}}{82}$

Therefore, they are closest at: .$\displaystyle 0.776092809\text{ hours} \;\approx\;46\text{ mimutes, }34\text{ seconds}$