As it stands now, it would appear the money would go to the banks and brokerages that hold the "bad" debt. The government would then unwind the mess over time.
It could work in the taxpayers favor as long as the government doesn't overpay for the suspect debt. At most they should pay 55-60 cents on the dollar. That gives them leeway on defaults and would allow them to essentially re-fi the debt to try to keep people from defaulting and being foreclosed upon.
But they need to implement the plans being suggested by Congress (yes, mainly Dems). Their has to be oversight on this, the taxpayers have to come first, the golden parachutes should all be eliminated, the government should get equity ownership in the banks/brokerages in exchange for buying this debt off their books. That way, when the stocks recover, the taxpayer benefits.