Let $L$ be the proposition that the left door leads to escape.
You ask a question $Q$ (some proposition). Let $R$ be the truth-telling/lying status of the person you ask (so true if the person is a truth-teller, false if the person is a liar). The response from this person is the truth value of $Q \Leftrightarrow R$.
So what you want to do is come up with some $Q$ such that $Q \Leftrightarrow R$ is equivalent to $L$. That is, you want the actual answer to your question to be the truth status of $L$.
Just make a truth table:
$\begin{array}{c|c|c|c}
L & R & Q & Q\Leftrightarrow R \\
\hline
T & T & ? & T \\
T & F & ? & T \\
F & T & ? & F \\
F & F & ? & F
\end{array}$
I've made the $Q \Leftrightarrow R$ column match the $L$ column (because this is what we want).
Now you can fill in the $Q$ column such that it works (there's only one way):
$\begin{array}{c|c|c|c}
L & R & Q & Q\Leftrightarrow R \\
\hline
T & T & T & T \\
T & F & F & T \\
F & T & F & F \\
F & F & T & F
\end{array}$
You see the answer is to set $Q$ equal to $L \Leftrightarrow R$.
That is, you can ask "Is it either the case that you're a truth-teller and the escape door is the left one, or the case that you're a liar and the escape door is the right one?" (There are equivalent ways to word this.) Then if the response is yes, go left, and if it's no, go right.