Get your taxes done using TurboTax

If you are claiming expenses for a dependent then the rule is based on your age not theirs since this is your tax return not theirs.

Same would be true in reverse ... a 65+ person with a 40 year old dependent ... it is based on the primary taxpayer's age not the dependent's age.