Get your taxes done using TurboTax

Repayment over $3,000. If the amount you repaid was more than $3,000, you can deduct the repayment. However, you can choose instead to take a tax credit for the year of repayment if you included the income under a claim of right. This means that at the time you included the income, it appeared that you had an unrestricted right to it. If you qualify for this choice, figure your tax under both methods and compare the results. Use the method (deduction or credit) that results in less tax.

See Repayments here:

https://www.irs.gov/pub/irs-prior/p525--2018.pdf