If grandpa pays granddaughter's tuition, and granddaughter claims her own dependency exemption, then granddaughter also gets to claim Hope credit.
Ah, you say, grandpa is trying to help out daughter and does so, so all is right with the world.
Now a slight change: Grandpa wants to help granddaughter but not help her mom. However, mom can claim an exemption for daughter and does.
So if grandpa pays granddaughter's tuition, mother claims exemption for this college student.
How's that for fair and right with the world?
Not that this has much to do with medical, but once we enter the fair and moral and stuff like that, tax law still gets in the way.