Before a right-of-way leeward yacht has started and cleared the starting line, it can only luff slowly. This allows the windward yacht room and opportunity to keep clear to avoid a collision.
After the starting signal, the leeward yacht must sail a proper course. A leeward yacht with luffing rights can luff as hard and as fast as she pleases with no hail given. A leeward yacht has luffing rights when an over taking windward yacht passes to the windward side within 2 boat lengths of each other.
After the start, the windward yacht can not sail below her proper course. A leeward yacht can not luff two or more yachts unless she has the right to luff all yachts which would be affected by her luff. Then all windward yachts shall respond to the luff.
To stop a luff, the windward yacht can call a "Mast To Stem" only if the windward yacht's mast is ahead of the leeward yacht's stem (bow). Once called, the leeward yacht has no more luffing rights during the existence of that overlap unlessuffing rights are re-established.
If you are over taking a yacht to leeward, you have no luffing rights and must sail your proper course. Buoy room out weighs luffing rights, so you must have luffing rights and begin luffing before the 4 boat length radius, before the "room at the mark" is called.
The answer is simple. To avoid getting luffed, stay further away than the 2 boat length rule. If not, pass the leeward yacht on it's leeward side. To aid in understanding luffing rights, read and go over them! This will allow better sailing and keep you out of trouble.