The war in Afghanistan is costing us $100 billion a year these days. The $4.7 billion in foreign aid we gave Israel and Egypt last year is considerably cheaper. How much did the last round of bail outs and stimulus cost the U.S.? Would you allow that $150 a barrel oil due to this short-sighted people's revolution spreading to Saudi Arabia or an attack on Iran would cause a repeat recession far more costly than foreign aid?
I will note a few things. First off, our aid has not exactly prevented instability in Egypt. Secondly, Saudi Arabia is not Egypt. Observers of Egypt already knew that Egypt was primed to blow --- if not quite in the dramatic way it has done so, but the disastrous attempt to implant Gamal on the throne alienated Mubarak's base and lent energy to the opposition. Tunisia was the spark on a quite dry field. The KSA, OTOH, has no such legitimacy crisis.

Yes, I'm saying that our government's appearance to abandon a long time ally will not go unnoticed. Abandoning an ally who has kept peace for 30 years and has enhanced the economy of one of the few Arab nations without much oil revenue constrasts with our assurances to Israel to "trust us," when we ask you to give Iran sanctions (and STUXNET) a chance. The Saudi Arabia reference in that context is a wink on Israeli use of their airspace. Think we could stay out of that war after the Straits of Hormuz get blocked?
Sorry, but circumstances change. Our "30-year ally" made his own bed. I was completely unaware that we were married to Hosni Mubarak or any other country or leader. The interests of the United States come first, not Mubarak's or Israel's. From a pure realpolitik standpoint, Mubarak has proven that his regime is no longer a guarantor of regional stability if it ever was (see: Ayman al-Zawahiri). The agreement between the Egyptian people and the regime has broken down - the only thing that can preserve him is brute force, and what kind of "stability" is that?

Also, if an Israeli attack on Iran was truly the imminent and drastically costly threat that you describe, it is quite easy for the U.S. to deter it in a number of ways.