Who's first in a battle in Sid Meier's Civilization: The Board Game (from 2010)?
Cards with Battle abilities can only be played before or after an attack on an enemy front (or starting a new front), not during the battle.

Animal husbandry can therefore only remove wound tokens from units who've survived with some damage.  Likewise, Mathematics can only add wound tokens to units already in fronts.  All these cards are resolved before the next card is played (which will kill any units who've suffered wounds equal to their strength) or also at the 'end of the battle' which in the rules, explicitly checks again for dead/surviving units.

In the case you listed, therefore, a wound token is removed then added or added then removed, then the unit is only 'checked' later after all cards have been resolved.

This means that if you initiate the mathematics, you might put more than a unit's strength in wound markers on an enemy if you want to guard against the use of animal husbandry.

Since this particular case doesn't matter, the more general answer is this, though there is no stack, the rules say that you take turns playing cards (defender first) and also that battle abilities are played immediately before or after playing a card.  This implies that you take turns playing battle abilities, just like cards.  After your opponent plays a card and the attack is resolved, you can ask him or her to explicitly give up control to you to play a card (asking them if they are going to use any battle abilities before you declare your action).  Once you declare, it's too late to use an ability on you, since it's your control now.