On the right side, turn the car so it goes towards the back of the area. Get on it, tell Trip to move it forward (towards the dead end), jump to the pole on the right, climb to the catwalk and cross it back to the other side. Turn the left car around so that it goes to the back of the area as well, tell Trip to move it forward, and voila! The way will be clear for the sub.
Starting from the beginning, go to left section, bring cart on the spinner, activate machine and hop on. Jump on other cart and do the same thing on the spinner. (This will activate a camera roll of where to climb) Hop back on and move towards the back of the room. There should be a pipe on the right to climb so you can get to the first switch. Once there, move cart back on spinner and voila! You should be able to move the carts forward for the sub to clear.