You have 2 switches to control the light in the long corridor.
You want to be able to turn the light on entering the corridor and turn it off at the other end.
Do the wiring circuit.
A: this is how I would connect the switches
let's put switch "A" at one end of the corridor and the switch "B"
at the other end. Then, lamp = A XOR B.
XOR is correct for your diagram. However, if you connect
switches A and B differently, then XOR is inverted. That
means when both switches are up (1) OR both are down (0)