Sign On Bonus Repaid (2022)

I got bonus of $25000 (sign on + relocation) in 2022. I repaid the bonus excluding Medicare taxes and SS. taxes during same tax year (before may 2022).

My ex-employer sent me W2-C changing box 3,5,6, and 4. 

How can I reclaim my federal tax deduction and state(NY) tax deduction ?

Thanks in advance.