Clearing the Path
Identify which ship needs to leave first. Usually it is the one blocking the most exit routes. Move smaller vessels out of the way to create a corridor.
Avoiding Deadlocks
Never move a ship into a position where it blocks the only path for a larger vessel. Always check the big picture before committing to a move.
Weather Effects
Later levels add wind and current effects that push ships in a direction after they move. Factor this drift into your positioning calculations.