The ship is 40 miles south and 20 miles east of port how do you know or calculate what bearing the ship would have to sail back to port

1 answer

figure the final displacement of the ship from the port.

Add 180° to get the heading back to port.