Given the movement of the ship, it can be respresented by the image below:
The distance from its starting point in a direct line is represented with x and can be calculated using Pythagoras Theorem as follow:
![\begin{gathered} \text{hypotenuse}=x\text{ km} \\ \text{adjacent}=15.2\operatorname{km} \\ \text{opposite}=12.8\operatorname{km} \end{gathered}]()
To get the hypotenuse, we have:
![\begin{gathered} \text{hyp}^2=opposite^2+adjacent^2 \\ x^2=15.2^2+12.8^2 \\ x=\sqrt[\square]{15.2^2+12.8^2} \\ x=19.8716\operatorname{km} \\ x\approx19.9\operatorname{km} \end{gathered}]()
Hence, the ship is approximately 19.9km away from the starting point in a direct line.