Please see this answer from Heather_Billings.
Yes - you can claim a repayment of social security benefits. The way repayment is claimed depends in which year income was repaid and how much the repayment was.
If you repay income in the same year(such as Social Security benefits) you can net the repayment amount against the amount reportable as income.