Crikey, I see these as two scenarios worlds apart from each other, the facts are very different and call for different actions/responses.
Some guy (you don't know if armed/unarmed) tears off in your car and you still have your boxing gloves on (giving you limited hand use outside of boxing glove punches) and you run up and confront them through the window. That is not needed. There will/should be car insurance, you can report to cops, etc. No need to get directly involved. Kind of like handing over your wallet rather than fighting to death over it, aside from a few dollars (that are often also insured these days), your banks and credit card agents will cover any loss.
Some guy racks an automatic rifle (= bad, bad intentions for all) in the carriage you and your mates are in, go for broke. That may save you and everyone else, or you (and everyone else) may still die, go for it. Or plunge through the carriage door into next compartment, jump from train etc. You may get out, others and your friends/family may not - that's your individual choice, you need to live with it, it may be the right choice for you...