In my AP US History class I was taught it was Reagan. However, upon googling it for my essay to find the exact date the hostages were released, politifact has said Carter's administration dealt with releasing the hostages.
Is this true?
There are split schools of thought on this, you could argue, but the consensus as I understand it is that Carter's administration was the one that handled the hostage negotiations and ultimately managed their freedom. Here's one of the original NYT articles about the subject.
If your AP history class taught the subject similarly to the way I always heard the hostage crisis story growing up, it likely involved Reagan being a fearsome man who they were afraid of crossing. The reality is a little more along the lines of Carter spending little time sleeping in the two days leading up to inauguration as he was negotiating the crisis.
Though he hoped that word of their freedom would come out prior to the inauguration, so that it could be his last success as President, the Iranians did not give him this victory. Ultimately, I believe he even was critiqued, according to one book, because he looked exhausted at Reagan's inauguration, in spite of the reason for this exhaustion. The failure of the Iranians to release the hostages before Reagan's inauguration, additionally, led to the idea that Reagan was the one who intimidated the Iranians into surrendering the hostages, at least as I often hear the story told. There is also, of course, the October Surprise Conspiracy Theory, which posits that Reagan and his campaign contacted the Iranians to head off negotiations in order to give him the victory through, I believe, Jim Baker, similar to what Nixon did through Anna Chennault in Vietnam and the 1968 election.
Interestingly, stepping back further in history, the 1979 Iranian Revolution (when the Iranian hostage crisis began) and the anti-American tone therein was, at least in part, because the modernizing prime minister of Iran, democratically elected Mohammad Mosaddegh, was overthrown with US support in 1953, under the administration of President Ike Eisenhower. This was done in part because of his decision to nationalize the oil fields, which pissed off the British, who had investments in them, and they appealed to the US that Mosaddegh was flirting with Communism/the USSR.
Sources:
Ike: An American Hero by Michael Korda
Reagan: A Life by H.W. Brands
Tear Down This Myth by Will Bunch
The Man Who Sold the World by William Kleinknecht
Nixonland by Rick Perlstein
The Invisible Bridge by Rick Perlstein
Redeemer by Randall Balmer
Patriot of Persia by Christoper de Bellaigue
Sleepwalking Through History by Haynes Johnson