Can a 5th yr architecture student claim the American Opportunity credit if they hadn't the prior 4 years? The student had 4 years of credits before 2021, 217 of 231 RED'd

Accredited architecture programs are five years so technically bachelors degree was not awarded until spring when all 5 years (231 credits) were completed. Credit was not claimed the previous 4 years because the student was a dependent on parent's tax returns, who were unable to claim the credit because their income was over the allowable limit.