Hi CN Rail,
You can only run DCS and TMCC/Legacy together on the same layout if you have the right versions of the DCS hardware.
If you have a DCS REMOTE COMMANDER, what you want to do will work great. Simply connect the red and black wire terminals to the center and outside rails respectively. The DCS RC will take its power directly from the rails and send out the DCS signal. The DCS RC looks like this...
If you have a DCS COMMANDER, as you said in your post, what you want to do WILL NOT work. The DCS Commander is designed for the HO market and will only work with DC track power. You can plug either an AC or DC power supply into it's input, but the output is always DC. Legacy can only operate on AC track power. DO NOT connect the DCS Commander's output terminals to AC track power. This will create a dead short. The DCS COMMANDER looks like this...
If you have a full DCS set you will also be able to run both systems on the same track at the same time. Most people on this forum have this version of the DCS hardware. Both John and John's posts assume that this is the version you have. The full DCS set with TIU and remote looks like this...