I think he’s saying that you can’t contribute to an HSA while on Medicare. When he started SS late, they retroactively enrolled him in Medicare Part A dating back a few years. And thereby disqualified those years’ HSA contributions. Which he then had to back out of his HSA and also pay income taxes on. To undo the effect of making those now-wrongful pre-tax contributions in prior years.
I agree that you can’t contribute to an HSA while on Medicare. Even if you have, like I do, a high deductible medigap plan.
But I think something is garbled in the rest of that story about Medicare part A retroactivity. Or he got screwed by a clueless worker at SSA or Medicare.