Answer:
One justification: "Mexico attacked us first." In April of 1846, Mexican cavalry attacked U.S. soldiers in a disputed area and killed about a dozen. This justified America's declaration of war in some's eyes.
Argument against: "Mexico only attacked us because we goaded them into it." Opponents to war said that Polk intentionally placed U.S. soldiers in the disputed zone so that Mexico would attack them.