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.
lets call A the switch at the beggining of the corridor and B
the switch at the 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)