Cross posting this here as well.
Mexico is part of the "6 month club". It's a US program but it's reciprocal. Basically as long as you're passport is valid upon entry, it's automatically extended up to 6 months. You obviously cannot stay past the 6 months. The issue may be getting the airlines to board you as they don't always know these things. You could contact the airlines reservation number and ask them to make a note in your reservation regarding your passport once they confirm it's validity.
I also recommend you could contact the Mexican Consulate directly for guidance if there are still questions. That's one of their functions.
As for US Citizens returning to the US, an expired US passport is valid for re-entry.
From the Mexican Consulate site:
It is recommendable that the passports should have at least 6 months validity before expiration.
https://consulmex.sre.gob.mx/detroit/index.php/servicios-para-extranjeros/visas-en-ingles
From the US Dept. of State site for Mexico:
PASSPORT VALIDITY:
Passport must be valid at time of entry.
Mexico International Travel Information
And the Six month club list, which is reciprocal and Mexico is a part of.
Six-Month Club Update | U.S. Customs and Border Protection