The best answer is:
D. The United States viewed the events as an unjustified Mexican attack on US soldiers and Mexico viewed the events as an illegal invasion of Mexico by the United States.
In the United States, the conflict was often framed as a defense of American interests and territory, particularly following the belief that Mexican troops had attacked American soldiers on what was considered disputed land. Conversely, Mexico perceived the incursion of U.S. troops into its territory as an unlawful invasion, especially since they did not recognize the annexation of Texas by the U.S.