Bush didn't hand Obama a $400b deficit, he handed him a $1200b deficit, 3x the size of the deficit you're pretending it was. That $400b deficit was the CBO's esitimate of expected shortfall from Bush's FY2009 budget proposal in April, 2008. However, near the end of Bush's term, the CBO revised their estimate based on the Continuing Resolution Bush signed in September, 2008 and based on the downturn in the economy and based on TARP.
CBO projects that the deficit this year will total $1.2 trillion
~ The Budget and Economic Outlook: Fiscal Years 2009 to 2019