The basic rule is 11:
11 ON THE SAME TACK, OVERLAPPED
When boats are on the same tack and overlapped, a windward boat shall keep clear of a leeward boat.
If you acquire a leeward overlap from behind, then Rule 11 is tempered by Rule 15:
15 ACQUIRING RIGHT OF WAY
When a boat acquires right of way, she shall initially give the other boat room to keep clear, unless she acquires right of way because of the other boat’s actions.
But what I think you are referring to is Rule 17:
17 ON THE SAME TACK; PROPER COURSE
If a boat clear astern becomes overlapped within two of her hull lengths to leeward of a boat on the same tack, she shall not sail above her proper course while they remain on the same tack and overlapped within that distance, unless in doing so she promptly sails astern of the other boat. This rule does not apply if the overlap begins while the windward boat is required by rule 13 to keep clear.
Also, definition of Proper Course:
Proper Course A course a boat would sail to finish as soon as possible in the absence of the other boats referred to in the rule using the term. A boat has no proper course before her starting signal.