The US economy is like a large oil tanker, in that it takes a very long time for changes in direction to take place.
Jimmy Carter was a very honest, very smart man who did not understand how Washington worked, and tried to work it the way he had governed in Georgia. He instigated 'Zero based budgeting" which meant that each agency had to submit a new budget with specific descriptions of what was to be accomplished each year. This took a long time to put in place, and most of the benefits of it did not take place until Reagan was in office.
Carter unfortunately believed Kissinger and allowed the dying Shah of Iran to enter the US and at the same time kept a full staff stationed in the Tehran embassy. Kissinger was and is an agent for Exxon and this was a plan to remove Carter, who was adamant on ending dependence on Big Oil and the Middle East.
Reagan made a deal with the Ayatollah to keep the hostages until the minute that Carter left office, in return for spare parts and munitions. Reagan was a very good actor who fooled most of the people most of the time. He did not fool me, I recognize a treacherous asshole when I see one. Or hear one, as Reagan was always gassing off on the radio all through the 1970's.