The easiest way to do it is to use a double-pole, double-throw switch. It will have 6 terminals. Wire 2 of the outside terminals to your DC power pack, wire the other 2 to the PowerCab. The centre pair go to your track, or your control panel (if you have block switches).
Wiring it this way...