The wires with plugs should have one wire identified on the insulation with a stripe or some other identification. If not, get an ohmmeter and check the wiring on both plugs to identify each wire. Tie the equivalent wires together on each wire harness, and then connect to the transformer. As long as you do this, you will not have any problems.
Which way the wires are hooked to the track should not matter. Try hooking them both ways and see if there is a difference.
Larry