Let A = Event that A speaks the truth
B = Event that B speaks the truth
Then P(A) =
P(B) =
P(A-lie) =
P(B-lie) =
Now, A and B contradict each other = [A lies and B true] or [B true and B lies]
= P(A).P(B-lie) + P(A-lie).P(B)
[Please note that we are adding at the place of OR]
=
=