How to enter 529 distributions from grandparent

My daughter attended college in 2022.  My father-in-law (her grandfather) provided funding for all tuition, books and laptop from a 529 he established for her.  She doesn't not have any other income to report.

 

Here are the details and numbers (rounded)

 

Provide the following info for more specific help

  • My daughter is claimed as my dependent.
  • Box 1 of the 1098-T = $14,000
  • box 5 of the 1098-T = $0
  • Box 1 of the 1099-Q = $15,000
  • Box 2 of the 1098-Q = $3,000
  • In the RECIPIENT'S TIN field of 1099-Q, my daughter SSN is included with the following:
    • Father-in-law's name and on the very next line...
    • FBO Daughter's name with her home address under her name
  • No room & board
  • Other qualified expenses not included in box 1 of the 1098-T = $1,000

Do I enter the 1098T on my return and the 1099Q on my daughter's with these exact amounts listed?  If so, entering these exact amounts shows that I will receive the AOTC and she will pay taxes on Box 2 of 1098T.  Is all of this correct, especially since the funding came from my father-in-law's 529?

 

I keep reading about not "double-dipping" and getting confused about how to enter.