Actually your left branch calculates (A & ~B) so it's true when first is on and second is off, your right branch calculates (~A & B) so it's true when first is off and second is on. The XOR gate which combines them it's true when inputs are different but (A & ~B) and (~A & B) can't never be true or false together, they're mutual conditions.

So (A & ~B) ^ (~A & B) simplifies to (A & ~B) | (~A & B), where ^ is XOR and | is OR. But (A & ~B) | (~A & B) is true when both inputs are in different states, which is the XOR operation, so the layout can be simplified to A ^ B:

You can see the minimal form of your boolean logic here:

https://www.wolframalpha.com/input/?i=(A+and+not+B)+xor+(not+A+and+B)