A luxury ship left the port and cruised for 7 miles at a heading of 38 degrees. It then cruised for 24 miles heading of 128 degrees and stopped. How far was the ship now located from the port?

The ship turned 90 degrees. So, the distance from port is just the hypotenuse of a right triangle with legs 7 and 24.

Look familiar?

To find the distance of the ship from the port, we can use the concept of vector addition.

First, let's break down the given information into two vectors:

Vector A represents the distance and direction of the ship's first leg of the cruise (7 miles at a heading of 38 degrees).

Vector B represents the distance and direction of the ship's second leg of the cruise (24 miles at a heading of 128 degrees).

To add two vectors, we need to decompose them into their x and y components.

For Vector A:
- x component = 7 * cos(38 degrees)
- y component = 7 * sin(38 degrees)

For Vector B:
- x component = 24 * cos(128 degrees)
- y component = 24 * sin(128 degrees)

Once we have the x and y components of both vectors, we can add them to get the resultant vector.

Resultant x component = (x component of Vector A) + (x component of Vector B)
Resultant y component = (y component of Vector A) + (y component of Vector B)

Finally, we can calculate the magnitude (distance) of the resultant vector using the Pythagorean theorem:

Distance from the port = sqrt((Resultant x component)^2 + (Resultant y component)^2)

Plugging in the values, we can calculate the distance of the ship from the port.