ESA distribution screw up and 1099-Q

My sons were enrolled in college in 2014. With my sophomore son I used up his ESA in Spring 2014 and my freshman had tuition of around $5000 in the Fall 2014. When the fee bill came I misread it and overpaid the institution by $2800. The university never notified me and I proceed to withdraw from his $7800 from his ESA. I noticed this months later and the university refunded me the amount.
Problem is how to report this on 1040 to avoid a penalty. I paid out over $25k combined for both sons in 2014 and withdrew a combined amount of $14k in ESA distributions and of course paid the rest out of savings.
Not sure how to reconcile this on the 1040 and if I can deduct the tuition I paid.
<< ------------------------------------------------------- >>
<< The foregoing was not intended or written to be used, >>
  Click to see the full signature.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
Add image file
Upload is a site by and for consumers of financial services and advice. We are not affiliated with any of the banks, financial services or software manufacturers discussed here. All logos and trade names are the property of their respective owners.

Tax and financial advice you come across on this site is freely given by your peers and professionals on their own time and out of the kindness of their hearts. We can guarantee neither accuracy of such advice nor its applicability for your situation. Simply put, you are fully responsible for the results of using information from this site in real life situations.