Answer;
They knew the only way to annex Texas was to declare war on Mexico.
Explanation;
At this time Texas was still connected to Mexico.
There were various reasons as to why the United states and Mexico went to war, but the most important ones were the US annexation of Texas and the Americans' desire for California and other Mexican territories
The United States won the war and Mexico signed the Treaty of Guadalupe Hidalgo in 1848.