And what could Carter or Reagan have done to make Eagle Claw a success?
Probably nothing. The entire plan was stupid to begin with - SecState Cyrus Vance warned Carter not to do it. It was only approved without Vance's knowledge while he was away from Washington, and when he heard about it he resigned in protest. Which makes perfect sense: if an enemy state is holding unarmed hostages and threatening to kill them, then the best solution probably isn't to send helicopters into Tehran and take them back in a show of heavy-handed force. Ultimately the best solution was the one Carter used to diffuse the crisis: he bloodlessly got the hostages out of Iran in exchange for an arms deal.