Many problems with this, and no answer, so here goes:
The first problem: The moral grounds by which I judge A or B are not necessarily the moral grounds by which they live. It is therefore difficult/impossible to call for the punishment of A or B, because we do not operate along the ethical lines. It is also impossible to judge them as moral/immoral persons under anything other than a personal moral basis - and so is not applicable.
The second problem: If both A and B are judged by myself to be roughly equally immoral ("evil"/"good" are very complicated terms to use), then it could be easily considered a moral act for A or B to hurt/kill the other. The removeal of an immoral person is generally considered a moral act.
The third problem: There is a difference between Intention and Action. If the intention is immoral, but the act moral then how do I judge it? And vice versa. It would be necessary to find out the intentions of both A and B both before, during, and after the scenario.
The fourth problem: Judgement and punishment are both part of a legal system, and can only be part of a legal system. Anything else is a personal descision and therefore not justifiable using anything other than personal morals (see problem 1).
The fifth problem: Killing/murder are entirely subject to personal morals. There is no other way to judge these acts and give some kind of seperation of the two, without resorting to a legal defenition - often based on an originally personal ideal.
In essence, there is no true answer. Everyone who comes up with something with this will base it on their personal moral attitudes. Things like 'good' and 'evil' are extremely subjective and there are so many modifiers that it is fairly impossible to come up with a singular answer that would satisfy everyone. These problems are all without the inclusion of Religion, particularly the Christian conventions, that often further complicated ethics. So yeah. I've not given a proper answer, because there just isn't one.