There are wire tracer/signal injector tools available for this sort of task.
Here is a Harbor Freight example.
These are conceptually not that different from Mex's suggestions, but can be a little easier to understand and use in practice and have the advantage of working via an inductive pickup so there's no need to pierce or strip the wire insulation. That's probably not a big advantage in your particular situation.
You can also deduce which wire is which by selectively shorting wires and measuring the continuity at the other end. It can take at least a few trips back and forth and some care in labeling and note-taking to be accurate.