Deductions & credits

I was told this is taxable and I can not turn around and use it as an education expense on federal taxes but can use the education expense on PA taxes? Is this correct or is the previous post correct? So confusing. Thanks.