Ex. Tuition, qualified fees, books total $40k. Your son has a scholarship for $40k. You also pay the university $15k for room and board. If you do nothing, the QEE is offset by the scholarship, so no taxable income to son, no AOTC for you.
Ex: Same numbers, but the scholarship allows you to use it for r&b, so you do. You pay the school $4000 to cover tuition (and another $11k to cover the rest of the r&b), but your son pays tax on $4000 of the scholarship on his return (it is taxed at YOUR rate because of the kiddie tax rules). You now qualify for the $4000 to be used for the AOTC.
So you can do what you want, apply the scholarship to the non-qualified expenses IF the scholarship allows it (can’t be done with some scholarships that may be used for tuition only) AND if your son claims it as unearned income on his return.