in 2024, you can take as a deduction for the repayment on schedule A line 16 denote as IRC 1341 repayment OR
recompute the taxes in the year you received the payment (2022) by excluding the payment.
the decrease in taxes is taken as a credit on schedule 3 line 13b
the amount to use is the relocation allowance included in box 1 of your 2022 W-2.
$3000 seems high for taxes but perhaps the moving expenses were a lot more. the company might have paid part of them directly and gave you $5K for what you paid. this is a guess. if you need details of the amounts the only place to get them is from the company