Overtaking vessels always give way, the only difficulty can be in deciding if you are overtaking or crossing. Of course, if you are in doubt you should assume that you are the overtaking vessel and keep well clear until you are past the other vessel.
If you can see, or are in a position where you would see the stern light of the vessel ahead, you are overtaking and must keep clear.
Of course, if you are the overtaking vessel you must keep clear until you are well past, you can not just manoeuvre to a place where you be the stand on vessel and expect the other craft to avoid you.
This Rule also means that a vessel on starboard tack, which is overtaking a vessel on port tack, is the give way vessel. For the same reason a sailing vessel overtaking a power-driven vessel, is also the give way vessel.
Sailtrain.co.uk is free to use, but if you feel you would like to contribute to the running and development costs you can donate via Paypal: