President James Polk was a person who knew how to compromise, but also knew how to force people to the table to deal. He was a forceful supporter of expansionism, and he was a supporter of the term “Manifest Destiny”, and its effect to put pressure on Britain and Mexico in their dealings with the United States.
Around 1836 the Republic of Texas declared its freedom from Mexico, and Texas wanted to join the United States. At first Texas was turned down because it would have likely been a slave state and there was a lot of controversy, the North wanted new states to be free states, and the South wanted new states to be Slave states, so when Texas first applied Andrew Jackson and others turned Texas down.
James Polk was a surprise candidate in 1844, and wound up being elected President. He favored Texas being tied in with the Oregon Territory question. Congress approved the annexation of Texas in 1844 just before Polk took office.
After Polk took office he moved troops to occupy part of Texas that the nation of Mexico still claimed, and this led to the Mexican American War in April of 1846. The United States Troops won battle after battle against Mexican soldiers, and by 1847 there was pressure to annex Mexico itself.
Polk pushed for a settlement, and finally Mexico agreed to sell California and New Mexico to the United States for various damage claims, and $15 million dollars. This helped end the Mexican American War, largely with the pressure from President James Polk, in 1848.
President Polk was largely responsible for forcing the British to settle and Oregon question and their signing of the Oregon Treaty in 1846, and also was instrumental in forcing Mexico to sell California and New Mexico and settle their differences to help end the Mexican American War in 1848.