From the port, the boat sails 24 knots, turning 90 degrees, sailing 27 knots. That makes up a right triangle, with the longest side x, hence
242 + 272 = x2 , x = 36.12
Now, the length of the 24 knots from the port to the south is,
24cos(72°) = 7.42
And the length of the 27 knots from the port to the south is,
27cos(18°) = 25.68
The total length from the port to the south is,
7.42 + 25.68 = 33.10
Therefore, the angle between the x and the total length
cos-1(33.10/36.12) = 23.6°
The answer is S23.6W