Thanks to President John Tyler Congress approved Texas Annexation on March 1, 1845. Tyler sent the offer to Texas himself on March 3. Texas approved the offer in July and James K. Polk got to sign Texas into the U.S in December.
Polk wanted to claim California, New Mexico and the land near the south border of Texas but Mexico would not let go of these territories. Polk offered $30 million for it and sent John Slidell to do this but Mexico refused. Polk declared war once the Mexicans fired on American Troops. Which gave him the excuse he needed to acquire land.
The Treaty of Guadalupe seal the American victory in 1848. Mexico gave up New Mexico and California in return for $15 million and the assumption of Mexican debts to the U.S. Mexico also gave up Texas and the border. On March 10 The U.S. approved the Treaty.