Well if the first ship leaves at a 35 degree angle relevant to the port and the 2nd ship leaves at a 125 degree angle relevant to the port, then the angle on the triangle which the ships form, becomes 90 degrees (125-35). The distance after 2 hours on the first ship is 30 knots and the 2nd ship has sailed 40 knots.

Since you have a right triangle, you can now use the Pythagorean theorem to show that the distance between the ships is

Now you can get the bearings or the other angles of the triangle by using (arc)trig functions.

. Now we can use: .