Also, just before Mexico crossed into the Nation of Texas ( 10 years old), the British ceded Washington, Oregon, Idaho, and part of Montana to the US.
Texas had American and Mexican settlers since before Mexico won it's independence from Spain. The people of Texas, both Mexicans and Americans, declared idependence from Mexico.