Hello, gofish!

I think it's easier with the Law of Cosines.

1) Starting at point A, a ship sails 18.5 km on a bearing of 189°,

then turns and sails 47.8 km on a bearing of 317°.

Find the distance of the ship from point A. Code:

N
C * M :
\ * : :
\ * : :
\ : * :
\ : * A
47.8 \ : /:
\43°: / :
\ :9°/9°:
\ : / :
\:/ :
* :
B S

The ship sails from $\displaystyle A$ to $\displaystyle B\!:\;\;AB = 18.5$

Hence, major angle $\displaystyle NAB \,= \,189^o\quad\Rightarrow\quad \angle SAB = \angle ABM = 9^o$

Then it sails from $\displaystyle B\text{ to }C\!:\;\;BC = 47.8$

Major angle $\displaystyle MBC = 317^o\quad\Rightarrow\quad \angle MBC = 43^o$

. . Hence: .$\displaystyle \angle ABC = 52^o$

Law of Cosines: .$\displaystyle AC^2 \;=\;47.8^2 + 18.5^2 - 2(47.8)(18.5)\cos52^o \;=\; 1538.231115$

Therefore: .$\displaystyle A \:=\:39.22028959 \;\approx\;39.220$ km.