if you repaid the relocation expenses in the same year you got them the adjustment must be reflected on the w-2 for that year. otherwise under IRC 1341 if you repaid that expense in a subsequent year and it was more than $3000 you get the following choices. a) take an itemized deduction on schedule a line 26 for the repayment in the year repaid or b) recompute your taxes for the year you got reimbursed by excluding such reimbursement from your w-2 taxable wages. then in the year repaid you take the amount as a tax credit on schedule 3 line 13d. note this is based on 2022 forms
Correction you take the amount of reduction in your tax liability as a credit not the amount repaid.