Question about refund, federal loans, 529 and taxes.

Son was planning on going to campus this fall, but had all online classes so decided to stay home. He had a Pell grant, a state grant and federal loans. Because he had no room and board charges he was sent a refund (even though we did not pay anything). I wanted to keep the federal loan to go towards the AOTC. My question is what should I do with the money he was refunded? Can I transfer it to his 529 account? Will it be treated as income for tax purposes? Can I pay off his federal loan and still use the loan to count towards the AOTC? He is hoping to go to campus in the spring and the money will certainly go back to the school at that point.

More information is needed before useful answers can be provided.

Did the school specifically say that the refunded money was for room and board charges?

How much was previously paid to the school for this semester, from what sources (Pell grant, state grant, federal loan, 529 account, personal funds, etc.), and in what amounts were these funds allocated to different expense categories (tuition, fees, room, board, books, other class supplies, etc.)?

The pell grants and state grant are not income, but they may be taxable if those amounts aren’t used for qualified educational expenses. The loans are not taxable.