Take all US troops out of Iraq and move them into Iran. The resulting power void in Iraq will leave the factions squabbling amongst themselves for control, and Iran will be too busy trying (and failing) to resist the US invasion to influence the process. Topple the Iranian government, destroy the infrastructure and all vestiges of WMD technology, administer free elections, and be done with it. At that point either bring the troops home or send them back to Iraq to knock over whatever maniac has seized power there in our absence, if he was not legitimately elected. Repeat the Iran-Iraq shuffle as necessary, until both nations get the point: We will not abide blind hatred and intolerance masquerading under the banner of religion, and especially not as a means of organizing a state.
If the Iraq debacle has proven anything, it's that we're really, really good at knocking over petty dictators and really lousy at installing democracies in their wake. So why not stick to what we do best? Knock 'em over and leave their nations to sort out their new governments for themselves. You can bet that whoever comes afterward will be, if not exactly grateful to, then at least respectful of US power.