You're ALL Correct. Even Historians can't agree on the TRUE root cause of the Mexican War.
As pointed out, the main factors were:
1) Polk was looking for an excuse to expand into Mexican Territory;
2) Mexico thought that Texas "owed them money" for damage caused during the Texas War for Independence;
3) Mexico and Texas disagreed over where the EXACT border was between Texas and Mexico;
4) Mexico started the War (they DID attack first--but then IMMEDIATELY retreated)--in an attempt to unite the many hostile political factions in Mexico against a common enemy... the United States.
"I say YOU'RE the CUTEST one. No, I say YOU'RE the CUTEST One. And we go on like that from dawn to three."