From a point on the port ,a ship is 5km away on a bearing S50E and another is 2km away on a bearing S60W. how far apart are these ships?

clockwise from north S50E is 180 - 50 = 130 deg and S60W is 180 + 60 = 240 deg

so
angle between bearings is 240 - 130 = 110 deg
triangle 5 km, 110 deg , 22 km
how long is the missing side opposite the 110 deg angle?
law of cosines
c^2 = a^2 + b^2 - 2 a b cos C
c^2 = 4 + 25 - 20 cos 110 solve for c