Retirement tax questions

It has nothing to do with whether or not he is claimed as a dependent.  You can only contribute to an IRA if you have "compensation" for performing work (earned income from working, or self-employment, or certain commissions, or certain post-graduate fellowships).  

 

He needs to contact the plan to process a "return of excess contributions."  He gets his contributions back plus any earnings.  The earnings will be taxable on his 2021 tax return plus a 10% penalty for early withdrawal.

 

If he leaves the money in the account, he pays a 6% penalty this year and every year after that the excess remains in the account.  If he has income from working in the future, he can "use up" the excess by applying the excess toward that years' limit.  (In other words, if he has a job in 2022, he can consider the 2021 excess as his 2022 contribution, and it won't be considered excess after next year's tax return.)