How are they installed? Sounds like someone slipped the pipe into the muffler and welded in place instead of normal exhaust clamps.
What mufflers are you going to use? Exact same replaments or something that may be a different size?
It's hard to say exactly how to replace them. Being the muffler is rusted out, what shape is the pipe in? Where the pipe is slid into the muffler, that could be rusted out as well.
My plan of attack (guessing since I can't see what you are working on) would probably involve a sawzall cutting the nipple flush with the muffler body. Get the body out of the way and see if the pipe in the nipple can be saved. If so, how hard is it to grind/cut the weld. Maybe just cut the pipe, ad a little extension to one side and shift the muffler forward of back a couple inches. Just guessing as I am not sure what you are working with.
Now if there are clamps involved, things may be different. Most of the time the clamp is tight enough to dimple the pipe. Back to cutting the nipple off the rotted muffler and scrap the clamp. If the clamp does not come apart, take an angle grinder or cut off wheel and just cut it. Now cut the nipple lengthwise. This may work with a welded exhaust if the weld is just a tack weld.
Now if the new muffler is longer, just plan your cuts and cut it out.
If the new muffler is shorter, you will be adding pipe unless it was built too long to begin with.
If the offsets don't line up, and you don't have enough wiggle room to line them up, getting new bits of pipe to line things up.
Lots of possible routes, all based on unknown variables.