What is the 22.5 degrees abaft the beam test?
You are overtaking when you come up with the other vessel from a direction more than 22.5 degrees abaft her beam — measured from her, not from you. The rule ties it to her lights: from there, at night, you would see only her sternlight and neither of her sidelights.
The arcs in Rule 21 match it. Sidelights show from right ahead to 22.5 degrees abaft the beam on their own side; the sternlight shows 67.5 degrees from right aft on each side. The line where her sidelight disappears and her sternlight appears is the overtaking line.
By day there are no lights to check, so you judge it from her heading and your bearing from her: if you are coming up from more than 22.5 degrees abaft her beam, you are overtaking. Near that line, Rule 13(c) settles the doubt against you.
A single white light ahead is not always a sternlight: it may be the all-round white light of a vessel at anchor under 50 metres (Rule 30(b)) or of a power-driven vessel under 12 metres (Rule 23(d)). Keep clear either way, and use bearings and radar to tell which.
What does 'coming up with' mean?
As we read it, closing on her from astern — gaining on her. A vessel astern of you that is not gaining is following, not overtaking, though Rule 7 still applies to deciding whether there is a risk of collision.
What if you're not sure whether you're overtaking?
Rule 13(c) settles it: if you are in any doubt, 'she shall assume that this is the case' — you treat yourself as overtaking and keep out of the way. The doubt is settled against the vessel coming up from astern.
In practice the doubt arises near the 22.5 degree line: at night you may see her sternlight and then a sidelight as one vessel or the other yaws, or by day the aspect is too fine to call. That is exactly the case 13(c) is for.
Who is the stand-on vessel when you are being overtaken?
The vessel being overtaken. Rule 17(a)(i) requires her to keep her course and speed while the overtaking vessel keeps out of the way. She may take action on her own once it becomes apparent the overtaking vessel is not taking appropriate action (Rule 17(a)(ii)), and must act when collision cannot be avoided by the overtaking vessel alone (Rule 17(b)).