The laws of murder appear to contain a tension of sorts with regards to killing one person in order to save another person’s life. On the one hand, there is an obligation to save the life of a potential murder victim, even if that involves killing the murderer, which is known in halakhic literature as the rule of a rodef, a pursuer. However, there is a general rule of ein dochin nefesh bifnei nefesh, we do not shed one life to save another. Thus, a woman in a difficult childbirth cannot have the baby killed once it extrudes its head, even to save her life (Mishnah Oholos 7:6). Why should the murderer’s life, therefore, be eliminated in order to save the victim? Additionally, is the concept of ein dochin nefesh mipnei nefesh identical to the reasoning that the Gemara provides for why one cannot kill someone to save himself: “who is to say that your blood is redder”?
R’ Chaim Halevi Soloveitchik in his commentary to Rambam Hilchos Rotzeach 1:9 uses the Rambam there to explain the concept of rodef. In theory, one life would never overvalue any other life (ein dochin etc.), and even an assassin would not be permitted to be killed to save his would-be victim. However, as the Rambam writes, this rule is overruled by the verse “not to pity him,” which the Rambam tells us is an independent commandment, a gezairas ha-kasuv teaching us that in this singular case, dochin nefesh mipnei nefesh. Thus, there is no contradiction between two principles, but a general principle that no life is taken for another, and a specific law overrunning this principle for a rodef.