It is difficult to give you a complete answer since you do not say if this student is your dependent.
The loans are irrelevant. Only scholarships would affect the 1099-Q and education credits.
If the student is your dependent, you enter the 1098-T from the school and the 1099-Q. TurboTax does the calculation and tells you if there is a credit and/or if there is taxable income. (and who needs to claim what)
If the student is not your dependent, and the 1099-Q is issued to you, you need to touch base with the student so that you both don't use the same education expenses.
If there is tax on a distribution, it is tax paid by the person that is issued the 1099-Q.
It is best (and was designed) for the student to make the distributions or that the funds are transferred directly to the school. That way the 1099-Q and 1098-T will both be issued to the student.
https://www.irs.gov/forms-pubs/about-publication-970