If A and B are two events, the probability that exactly one of them occurs is given by
P(A)+P(B)−2P(A∩B)
P(A∩B)+P(A∩B)
P(A∪B)−P(A∩B)
We have,
P(exactly one of A, B occurs)
=P[(A∩B)∪(A∩B)]=P(A∩B)+P(A∩B) =P(A)−P(A∩B)+P(B)−P(A∩B)=P(A)+P(B)−2P(A∩B)=P(A∪B)−P(A∩B)
Also,
P(exactly one of A,.B occurs)
=[1−P(A∩B)]−[1−P(A∪B)]=P(A∪B)−P(A∩B)]=P(A)+P(B)−2P(A∩B)