At no point can you ever trust the two doors puzzle. If one of the guards gives you the puzzle, then it is automatically suspect. Even if the rules are written on a sign, you have to ask yourself “Who wrote that sign? Can they be trusted?”

The best way to go about this is to knock out the guards, and throw one into each corridor with a rope tied to them. Then wait half an hour and pull on the ropes to see which guard died.