retention bonus received in 2021 that was repaid in 2022. Amend 2022 return? If so, would 2022 amended return be timely filed by April 15. 2026?

My wife received a retention bonus of $5,000 in 2021 that she repaid in 2022 since she opted to retire in 2022. We've always filed jointly. After she repaid the $5,000, she received a Corrected Wage and Tax Statement (Form W-2c) for 2021, but the only corrections on the W-2c were for her Social Security Wages (Box 3) and Medicare Wages (Box 5) and her Social Security Tax Withheld (Box 4) and Medicare Tax Withheld (Box 6). I thought perhaps her employer would have sent her the Form W-2c with her Box 1 corrected as well, but after doing a bit more research, it appears that this is a so-called claim-of-right repayment and that we should have taken a deduction or credit on our 2022 tax return. My question then is: Should I amend my 2022 return to take the deduction or credit and if so, do I have 3 years from the due date of the 2022 return (which I think was April 17, 2023, so until April 17, 2026) to timely file the amended return for 2022? Would my state (Pennsylvania) situation be the same (i.e., would I file an amended 2022 return that would be due no later than April 17, 2026)?