You ask one of the guards,
"if i were to ask the other guard which door is the right one, what would he say?"
For example, the correct door is the door on the left, so if you asked the truth telling guard, he would say, "The other guard would say, the door on your right"
If you asked...