The hostages were just window dressing. If there were no hostages, they’d have to create some.
The whole transaction was sending money to Iran.
Since there were some hostages in Iran’s hands, they were released to make it publicly more palatable to fork over the cash.
So what? He used his own money to go there.