Do you actually think the US would preemptively invade Mexico in this scenario?
As an American, that sounds ludicrous, and I cannot imagine anyone in the US supporting that plan with the enthusiasm that Russians currently support the invasion of Ukraine.
I think the US would attempt to destroy the Mexican government. If it came to it, yes they would invade, although first they would simply try to install a friendlier government through a coup of some sort (it has been US policy to oppose any such actions since Monroe doctrine). As for the feelings of the US public, they can be swayed to war, as history shows.
The US did preemptively invade Panama in the past, at the first sign of General Noriega's shift toward the Soviet bloc, after his soliciting and receiving military aid from Cuba, Nicaragua, and Libya.
As an American, that sounds ludicrous, and I cannot imagine anyone in the US supporting that plan with the enthusiasm that Russians currently support the invasion of Ukraine.