It is possible to safely run the preamp from one amp into the power section of a second amp, and then into one cab (assuming SS heads). To do this, you'd use an instrument cable to connect the respective preamp out from amp 1 and power amp in for amp 2. Then just run a standard speaker cable from amp 2 to the cab. This is good for something like a beta bass, where the tone is killer but the power just isn't enough.
But if you're talking about switching from amp 1 to amp 2, or even using both simultaneously, to get the tone of both amps through the same cab... I'd retire that idea straight away. Damage will most likely ensue. Just get yourself a second cab. With two separate rigs, you can either daisy chain them (assuming vintage SS heads, run an instrument cable from the 2nd input jack of amp 1 to the input jack of amp 2) OR if you want to be able to do some switching, use an ABY between your instrument and the heads. (i recommend the big shot aby for it's noise control features).