Basically you sail a track which has a total distance of 500m which includes the gybe or tack.
You must sail back to where you start- your start & end point can be at most 50m apart. So aim to sail around 250m gybe & return to near where you started.
Apparently best is to sail at 90deg to wind.
Sailing very fast & broad into a gybe will mostly put you outside that start/end 50m proximity so it isn't about the fastest person off the wind. It's all about nailing a clean, relatively tight planing gybe.
There are many ways to play the game- sacrifice a bit of top end speed & go for something with a bit of float or that will get you round or use a sail that is easier to handle. Maybe you want to gybe and then cross over your path on the way back or maybe you want to round up slightly before going into the gybe.
If you want some tips on the best way to pull of a good alpha Simon, Vando, Pierre or Brad would be the guys to ask (i gybe with the finesse of a baby elephant

).