That said, there's an overarching idea that one shouldn't try to "get even" by lowering oneself to the other person's level. Proportionality as a legal concept makes it legal to defend yourself, but illegal to escalate the threat.
E.g. one can use fists against fists, but if B stabs A to death, it will be hard to claim it was in self defense, since there is no obvious proof that A was looking to murder B by punching B to death.
If it is possible to refrain from violence and use the justice system to replace it (by having B press charges against A), then that ought to be a more civil outcome.
One could argue that the reason to have a legal system is so that B does not have to go around preparing to punch back, but can spend her time doing more productive things and that is how we end up with a civil society, with a high level of productivity and freedom of expression, and a minimum level of violence.