the war was to gain land and the president was James Polk, us offered $30 million to buy New Mexico and California but Mexico refused. That led to war and us gained California, Nevada, Utah, Arizona, New Mexico, Colorado, and Wyoming (increase us by 25% second largest lang gaining in us history the biggest was the Louisiana Purchase) and us paid Mexico $15 million.