There is no requirement as to how you pay the money for the education expenses, no need to directly transfer the funds. Just keep records of your payments. The only requirement with respect to an early-distribution penalty from an IRA is that they be paid in the same year as the distribution.
Note that the penalty exception only needs to be applied to the portion, if any, of the distribution from a Roth IRA that would otherwise be subject to an early-distribution penalty. See the ordering rules for Roth IRA distributions:
https://www.irs.gov/publications/p590b#en_US_2023_publink100089915