One way is to use the law of cosines. We have an angle and two sides.
The angle is 50 degrees and the two sides are 10 and 15 km.
The distance from the ship to the harbor can be gotten from:
Once we have that distance, the bearing back to the harbor can be gotten from the law of sines:
Once we get that angle add 200 degrees to get your azimuth.
We find it is about 242 degrees. That is a bearing of