Youre not accounting for inflation. The value of a dollar today is much more than the value of a dollar years later. Especially when inflation is 6%. The bailed out banks received $426B year 2008 dollars and the TARP dollars recovered are $442B 2014 dollars.
In real terms, the Treasury should have recovered $467B 2014 dollars for its investment to have a 0% real rate of return. In fact, $25B real 2008 dollars were given to banks and never recovered.