Ask the guy asking the question „do I have to point out who is who in order to pass through?“
Couldnt you just ask:
“Tell me which door is safe while using a sinonim of truth”
Or
“Tell me a sinonim of truth while precising which door is correct”
Something that has always bothered me with the “one of us tells the truth, the other one lies” conundrums is couldn’t you just ask a simple question with a known answer to check who’s who? Something like “what’s 1+1” or even a logic question like “if A is true and B is true, is the condition of A AND B true or false?”
Yes, that would let you know if the one you asked tells the truth or lies. But IIRC those riddles are usually constructed such that that is not enough to solve them. For example, sometimes there are more than two people that you need to identify. Or you need to find the correct door amongst multiple. All with a single question to one of the people.
Either of their proposed questions should still immediately tell you which door is which, though.
What would be really fun is determining which door tells the truth, then coming back periodically and asking it questions about how the setting’s metaphysics work, or where an important NPC is at the moment, or what the BBEG’s weakness is.
“I don’t know” can be a truthful statement. Why would door guy be omniscient?
This would be a pretty amusing encounter I think.
Mage: “Uggghh… well I translated the inscription on the door. We have to resolve their quarrel to dispell the magic lock.”
Bard: “So hey fellas, my party and I saw you from across the dungeon…”
I like the referenced riddle because you can’t “fully” solve it, in the sense that you know all the information. You can figure out which path to take (which solves the riddle) but you cannot simultaneously know who lies and who tells the truth, which gives the riddle a bit of an unresolved feel. (I’m assuming it’s one yes-no question only.)