From a point on the edge of the sea, one ship is 24km away on a bearing S50E and another ship is 7km away on a bearing S40W. How far apart are the ships?

S50E vs S40W

Doesn't that form a 90° angle?
So you have a right-angled triangle with legs of 7 and 24, and you are looking for the hypotenuse.
Pythagoras anyone ?

To find the distance between the two ships, you can use the cosine rule. The cosine rule states that in a triangle, the square of one side is equal to the sum of the squares of the other two sides minus twice the product of the lengths of those two sides and the cosine of their included angle.

In this case, we can consider the two ships and the point on the edge of the sea as forming a triangle. Let's label the point on the edge of the sea as point A, the first ship as point B, and the second ship as point C.

From the given bearings, we can determine the angles of the triangle:
∠BAC = (180° - 50°) = 130° (opposite to S50E)
∠BCA = (180° - 40°) = 140° (opposite to S40W)

Let the distance between A and B be represented by a (24km) and the distance between A and C be represented by b (7km).

Applying the cosine rule:

AC² = AB² + BC² - 2 * AB * BC * cos(∠BCA)

AC² = (24)² + (7)² - 2 * (24) * (7) * cos(140°)

AC = sqrt((24)² + (7)² - 2 * (24) * (7) * cos(140°))

AC ≈ 24.45 km

Therefore, the two ships are approximately 24.45 km apart.