Retirement tax questions

I am in this situation. I will take the RMD this year, and pay taxes on it this year.
How do I fill out the amended returns for the prior years in such a way that I
am not paying taxes twice on the RMD shortfall(s)