What tangent?
Again, the US/UK operation took out a democratically elected Mosaddegh and replaced him with royalty. That's the American revolution in reverse. And that was basically done because oil companies were hopping mad that Iran was going to nationalize a natural resource. What Carter did with Iran was to save the hostages. It would have done no good to send troops in. It would have been a bloody mess.
And it was the Carter Presidency that started supporting the nuts in Afghanistan. The Russians had almost the same reason for going into Afghanistan that the US had for going into Vietnam. Their puppets were in trouble. Nothing "emboldened" them to do so except maybe the Vietnam war. Carter also put up a wheat embargo. The Carter administration was pretty hellbent on eviscerating the Soviets. Only the Carter policy was to harass. Reagan changed that to "win" in Afghanistan, so with that came lots of training from the CIA and better weapons. And thanks to Reagan and George HW Bush..those folks learned enough to become a real effective group of terrorists.
They took Mossadegh out and in 1979 they took the Shah out. What's the difference. You have the chronology of it all mixed up. Carter visited the Shah and praised him as an ally and told him to give more freedoms of speech (as obama did to Mubarek during his message to the Muslim world in Cairo) The riots were started by British spies and paid instigators in Iran and snowballed. The Shah not wanting to massacre his people like Assad left the country and his ungrateful people to their destiny, which was fulfilled. Khomeini arrived and then the hostages were taken with his blessing. Carter being the weak indecisive terrorist appeaser he was, turned America into a paper tiger, and an embrassment.
Then came Reagan in a landslide, to restore pride, strength, and what America stood for.