Final answer:
The United States acquired Texas by annexing the Independent Republic of Texas in 1845, following the election of President James K. Polk and after recognizing it as an independent nation since 1837.
Step-by-step explanation:
The United States acquired Texas by annexing the Independent Republic of Texas. Texas had declared its independence from Mexico in 1836 and formed the Lone Star Republic after a series of conflicts and a final victory at San Jacinto. Though originally hesitant because of the issue of slavery and relations with Mexico, the U.S. officially recognized the independent nation in 1837. By 1845, following the election of expansionist President James K. Polk and increasing pressures from American settlers who had poured into Texas, the U.S. annexed Texas into the Union, setting the stage for the Mexican-American War. The subsequent war from 1846 to 1848 led to significant territorial gains for the United States after the defeat of Mexico and the signing of the Treaty of Guadalupe Hidalgo.