TlDr; Leave the Middle East, focus on domestic energy options including drilling in Anwar, build alternative energy tech for the future.
I'll be candid about my political opinions. The U.S. record in the middle east is abysmal, stretching back into the 70s. There is no clear victory to be had there. The real solution is to withdraw from the solution and focus on domestic sources of energy even if it means drilling in Anwar. And the reason I say that is the environmental damage caused by the Iraq war is catastrophic. Think of all those oil wells that Saddam ignited.
Once a strategic withdrawal is implemented, the passions that fuel terrorism may diminish with time. And we must not keep military bases in Saudi Arabia. Let the Saudis fend for themselves. They have the money.
And finally, focus on alternative energy sources for the future. But with the present policy? That spending is a must. The threat of another 9/11 or something worse is always on the horizon.