That's the point. They buy from the bank cheap with the hope that the money lets the banks recover. Their share is then worth more and then they can sell it back to recover their costs. It'd be extremely unlikely they'd make a profit or even break even but the possibility is there.
You're confusing the FDIC's role as an insurance corporation with the TARP bailout.
Say you deposit $100,000 in the bank, and then you come back a month later to withdraw your money. Imagine your shock when the bank tells you that they made some bad purchases, and now they only have $10,000 left to pay you. This is where the FDIC steps in: They will take over the bank and supply the $90,000 needed to repay you. When this happens, the FDIC pays
nothing to the bank, but only to the investors (i.e. you). Under no such circumstances does the FDIC buy stock in the bank. To date, all the bank bailouts have been of this sort.
The TARP bailout is something else entirely. The details are still being worked out, but the plan is that the government will buy up faulty home mortgages and other debts. If the housing market recovers completely, and all these debts get paid, then the bailout won't cost a penny (and will actually make money for the government). On the other hand, if the market collapses entirely, then the government may never see those $700bn again.
In addition to buying up unwanted securities, the TARP bailout may also involve buying stock in various companies; but I haven't heard about this yet.
From that wiki link it seems like they are actually looking to buy ownership equity as a means to "bail out".
I think in the context of a bank, an "equity stake" is the bank's assets (mortgages, loans, CDOs, and other debts owed to the bank). This is different from stock in the bank. When they say the government will purchase an equity stake, that probably means they're buying crappy mortgages.