I think you need to be very clear what 'cost' means.
The direct financial cost of rescuing the Apollo 13 astronauts was relatively tiny: no part of the spacecraft was being lost as a result that would not already have been lost, there was no expensive resupply or rescue mission, so it comes down to the cost of paying people on the ground to work some overtime. That's tiny compared to the cost of a mission.
A possible indirect cost is that one mission didn't get to go to the Moon: perhaps they could have landed in the knowledge that it could never come home? No, they couldn't: after the accident they weren't going there whatever they did. The CSM was going to kill them before they got to the point where they could land, so their only option was to use the LEM to stay alive, at which point they could not go to the Moon.
So the remaining options were let them die in space while everyone watched, or try to bring them home, with the cost of the latter option being the overtime payment, which is relatively minute.
And a final consideration is: if they had let the crew die in space to avoid the overtime cost, what were their chances of getting anyone else to fly a mission? I'd guess 'very small indeed': if they had done that the programme was probably dead.
Note that the above is an attempt to do a cold-blooded summary of the options & their consequences: I would be really surprised if anyone at NASA did that, the ethos of the organisation was, I am sure, 'we get them home alive, if we possibly can'.
I think it's worth quoting Gene Krantz here:
Spaceflight will never tolerate carelessness, incapacity, and neglect. Somewhere, somehow, we screwed up. It could have been in design, build, or test. Whatever it was, we should have caught it.
We were too gung ho about the schedule and we locked out all of the problems we saw each day in our work. Every element of the program was in trouble and so were we. The simulators were not working, Mission Control was behind in virtually every area, and the flight and test procedures changed daily. Nothing we did had any shelf life. Not one of us stood up and said, "Dammit, stop!"
I don't know what Thompson's committee will find as the cause, but I know what I find. We are the cause! We were not ready! We did not do our job. We were rolling the dice, hoping that things would come together by launch day, when in our hearts we knew it would take a miracle. We were pushing the schedule and betting that the Cape would slip before we did.
From this day forward, Flight Control will be known by two words: "Tough and Competent." Tough means we are forever accountable for what we do or what we fail to do. We will never again compromise our responsibilities. Every time we walk into Mission Control we will know what we stand for. Competent means we will never take anything for granted. We will never be found short in our knowledge and in our skills. Mission Control will be perfect.
When you leave this meeting today you will go to your office and the first thing you will do there is to write "Tough and Competent" on your blackboards. It will never be erased. Each day when you enter the room these words will remind you of the price paid by Grissom, White, and Chaffee. These words are the price of admission to the ranks of Mission Control.
– Gene Krantz, address to his branch and flight control team on the Monday morning following the Apollo 1 disaster, 30 January 1967