This is also sort of an AHC for those want to try to figure out how it happens.
Basically, the premise I'm working with here at least is that at minimum, Mexico is able to do enough fighting back that the war drags into a stalemate, or who knows, maybe the Mexicans do something surprising somewhere.
What are the possible effects for the aftermath if somehow the US isn't able to win the Mexican-American war?