It is warfare if the Mexican soldier was acting on orders to invade the United States, which is unlikely.
These drug cartels have been using the Mexican Army as armed escort for many years now. They do this to protect the drug shipment.
In past, if the drug smuggler encountered the Border Patrol or other US law enforcement agencies, they would drop their load and run south. Now, however, with the Mexican military as escort, all they do is turn around and drive back to Mexico-—with their drug load. The Mexican military provides rear-guard action to protect the shipment.
What is different in this case, and not really reported, is the Mexican military tried to abduct the Border Patrol Agent, take him back into Mexico.
Why?
Here's my thought on that: Along that area of border are buried and hidden sensors that alert the Border Patrol to the presence of people or vehicles making their way illegally north. The Mexican military wanted to abduct this agent and take him south to extract the location of the sensors. Of course, we all know how they would extract that information and what they would do with the agent after they got that information.