A ship leaves its home port expecting to travel to a port 500 km due south. Before it moves even 1 km, a severe storm blows it 170 km due east.
How far is the ship from its destination? In what direction must it travel to reach its destination?
This is a vector addition problem which can be solved using a right triangle, the Pythagorean theorem, and sine, cosine,and tangent functions.
First construct a right triangle, with the 90 degree angle at the origin, the short side going 170 km to the right from the origin, and the long side going 500 km down, from the origin. Now connect the ends of those two lines with the hypotenuse of the triangle.
Using the Pythagorean theorem, solve for the length of the hypotenuse.
170^2 + 500 ^2 = z^2
z = 528.1 km as the distance from where the ship is now to where it needs to go.
Now you need to know what direction to travel to reach your destination.
If you take the inverse tangent of the angle between the short side and the hypotenuse, you can find the angle in degrees.
tan^-1(500/170) = 71.2 degrees. So you need to travel in a direction 71.2 degrees south of west for 528.1 km to reach your destination.