The only relevance of Mexico to the visa waiver program is that, if you enter the US on VWP, you can’t make a short trip to Mexico to start a new 90-day period on VWP. So, for example, if you spend three weeks in the US, followed by a week in Mexico, followed by another three week in the US, the US will treat this as if you spent all seven weeks in the US. In particular, you can’t spend 90 days in the US, go to Mexico for a couple of days and then come back to the US on VWP for another 90 days. Canada and the Caribbean are treated the same way, for what it’s worth.
You haven’t made a short trip to Mexico, so all of this is irrelevant to you. The US isn’t going to think that you spent two years in Mexico just to get around US rules about visit duration.
Credit:stackoverflow.com‘