The best way would be to trace the wires from the pot to the controller/VFD using an ohmmeter.
It is also safe to try all 3 wires randomly IF you keep the potentiometer around the middle position and don't turn it all the way CW or CCW.
Connect the potentiometer (keeping it centered), turn the spindle on. If the spindle runs at half speed, then the wiper wire is in the right place. Then you just may have to swap the two track wires.