Michael, unfortunately I have no idea what colour wires are used in either of the cables, or even if the motor harness and the front control harness use the same colours, as I have not yet cut open either of the harnesses to check.
I think it would be much easier to simply cut the front harness and then solder in a length of 8 core network cable to extend the harness to the required length:
Doing it this way would ensure the controller could still be accessed for programming, whilst also allowing the wheel to be more easily removed for changing tyres etc.
If you're still determined to remove the plug and socket from the two harnesses, you will need to trace each wire with a continuity tester to determine which colour wire is connected to which of the pins/sockets on each of the cables.
Alan