These situations can depend hugely on whether the person behind the counter is having a good day or not. USA regards any trip taking place in US + Canada + Mexico as one long trip in the USA and it all counts towards the 90 days (or 180 days if you entered on a B1/B2 visa). Normal advice is you need to quit those three countries entirely to reset the clock. Their web site goes into details of what all your options are and there are not all that many.
I would suggest approaching immigration before your time runs out rather than after to see what your options are. USA is one of those systems where it is NOT better to ask for forgiveness than get permission.
|