The scene is in chapter 12, "Inside Information." Bilbo has just taken a "two-handled cup" from the hoard of Smaug the Dragon. The Dwaves are enjoying the moment when the narrator gives a foreboding observation: "It does not do to leave a live dragon out of your calculations, if you live near him."
It is relatively easy to grab a trophy and run, but it is not easy dealing with the dragon. It was far too easy for Congress to come up with a "Bailout" plan, but it will be far more difficult to deal with the economic Dragon that has lain hidden for many years. The powers that be, including Congress, the Administration and Wall Street, did nothing while the Dragon of predatory lending and other shady dealings was left to slumber until the day of its awakening.
The Dwarves were fortunate that Providence was on their side, and Bilbo turned out to be a shrewd negotiator in the end. As Gandalf says at the end of the book:
You don't really suppose, do you, that all your adventures and escapes were managed by mere luck, just for your sole benefit? You are a very fine person, Mr. Baggins, and I am very fond of you; but you are only quite a little fellow in a wide world after all!
Bilbo agrees, saying, "Thank goodness!" I think perhaps Tolkien intended more in those two words than just a common expression of relief.
I wonder how much Providence will continue to tolerate our excesses. And I wonder if we shall ever find a leader with the quality and humility of Bilbo.