I would ask one of them "Which door would the other guard tell me to be the 'safe' one?"... And then I'll take the other door.
Given that door A is the safe one and door B would kill me:
If he's lying he'd think "I know the other one would recommend A", and says "B.", since he's lying.
If he's telling the truth, he'd think "I know the other one is lying, so he'd recommend B." And since he's telling the truth, he says "B."
An old man is taking a walk in the forest. Two sinister looking men appear from behind a bush. One of them takes out a knife... the other one takes out a gun. They say: "Say something. If it's a lie, we're going to shoot you. If it's the truth, we're going to stab you."
What does the old man say to safe his life?