To get a credit or deduction for education expenses, you have to pay tuition or related costs for yourself, your spouse, or another dependent on your return. If you paid tuition or other education expenses for someone who's claimed on another person's return, you won't qualify.
If any of these things are true, you also won't qualify: