On May 13, 1846, the U.S. Congress overwhelmingly votes in favor of President James K. Polk's request to declare war on Mexico in a dispute over Texas. Under the threat of war, the United States had refrained from annexing Texas after the latter won independence from Mexico in 1836.
Polk revised his war message, then sent it to Congress on May 11 asserting, "Mexico has passed the boundary of the United States, has invaded our territory and shed American blood upon America's soil." On May 13, Congress declared war, with a vote of 40-2 in the Senate and 174-14 in the House.
Therefore, last answer is a correct one.