You would ask "What direction would the other guide tell me." After that, do the opposite.
If you asked the one that always tells the truth, he would know the other would lie and tell you the lie. You do the opposite and are safe.
If you ask the liar, he would lie and tell you the guide who tells the truth would give the wrong direction. But you always do the opposite and will be safe here too.