In the case presented, it is either kill the attacker and the innocent hostage, or die myself. That one is easy.
Left out, though, is the danger to others behind me whom I'm responsible to protect.
Also the danger to victims of future subsequent attacks (like this guy is going to stop once he kills me).
So might be an interesting thought experiment, but no real value to anything happening in the world in the moment (as I believe it was intended).