My 7 year old Yehoshua wanted to know – if someone says I have one bullet and am either going to kill you or another Jew, should one offer oneself to save one’s friend? Does it compare to murder being yehareh veal yaavor?
The idea that a Jew should rather give up his own life, than to kill another Jew is because he is killing someone. Who is to say that I am better than him? Therefore we may not kill him, even if it means that the person may die as a result.
However on the other hand a person does not have to go and kill himself and offer himself to be killed in order to save someone else. because who says that he is worse than the other guy? Therefore the person should not offer himself to be killed instead. in order to save the other person.
We should never have to need these halachos.