Tosfos answers that the word "derech" in the second pasuk is not referring to the actual "war", rather it is referring to the "warriors" who are men. But that is not really true. The word "derech" in that pasuk is not referring to "war" or "warriors", it is referring to the road that the warriors will travel upon when waging war. So this brings back Tosfos' question: why does the pasuk refer to "derech" in the masculine form?
Tzvi Hertzberg, New York, USA
Tosfos is explaining that since the word "Derech" can be used both in a masculine and feminine form, the determining factor is not just the definition of the word Derech in that context, but also what is the subject of the Pasuk in which the word Derech appears. Tosfos is explaining that since the primary subject of the Pasuk is regarding warriors who are men, Derech is used in a masculine form.
All the best,
Yaakov Montrose