Going to Mexico (or Canada or many Caribbean countries) won’t reset your VWP timer and there’s a possibility you won’t be allowed back in the USA to catch your flight if the immigration control officer thinks you’re trying to game the system.
Which, to be fair, you are. Showing the ICO your ticket for your same-day flight out of the USA and expressing willingness to be escorted to the gate and onto the departing plane may help (as that’s what they’d have to do anyway to deport you) but if the ICO is in a bad mood, they could still enter a black mark in your entry record which will make it difficult to ever visit again.
As a commenter pointed out, you’ll likely be able to change your flight date for cheaper than flying to Mexico. Telling the agent your sob story on the phone will increase the likelihood they will bend the rules to allow this (such as waive or lower the change penalty).
Footnote: Even if you travel to an country where the ESTA would reset (i.e., South America, Asia, Europe), you would have been in the USA for 89+ days, then travelled out for 3 weeks and are returning. Most ICOs will look at such a quick return after a long trip rather skeptically. You’ll still be at risk for being denied, which would be a black mark on your travel record and IMHO not worth doing.
Credit:stackoverflow.com‘