#### Answer

The ship traveled 17.8 km

#### Work Step by Step

Let $A = 44.2^{\circ}$ and let $B = 38.8^{\circ}$. Let the lighthouse be located at position of angle $C$. We can find angle $C$:
$A+B+C = 180^{\circ}$
$C = 180^{\circ}-A-B$
$C = 180^{\circ}-44.2^{\circ}-38.8^{\circ}$
$C = 97.0^{\circ}$
Let $a = 12.5~km$. We can find the length of side $c$ which is the distance that the ship traveled:
$\frac{c}{sin~C} = \frac{a}{sin~A}$
$c = \frac{a~sin~C}{sin~A}$
$c = \frac{(12.5~km)~sin~(97.0^{\circ})}{sin~(44.2^{\circ})}$
$c = 17.8~km$
The ship traveled 17.8 km