Overtaking a plane at first glance seems like a bad idea. That is mostly because we are used to overtaking within the context of cars, and the proximity, when applied to airplanes, is immediately frightening.
Needless to say, the proximity factor is nothing like that of cars when overtaking in airplanes. But just as there are simple rules of courtesy to safely complete the maneuver on the highway, so there are similar rules in the air.
1. When piloting an airplane, if you are being overtaken, you have right of way.
2. The overtaking vehicle is obliged by the rules to alter course to the right so that they overtake you at a safe distance.
3. This rule is the same whether the overtaking maneuver takes place over land or sea.