A and B will agree on a certain statement if both speak the truth or both tell a lie. Now, let us define the events as follows:
E1: A and B both speak the truth ⇒ P(E1) = xy
E2: A and B both tell a lie ⇒ P(E2) = (1 – x) (1 – y)
E: A and B agree on a certain statement.
Clearly, P(E/E1) = P(E/E2) = 1
Now, we are required to find P(E1/E).
P(E1/E) = \(\frac{P(E_1).P(E/E_1)}{P(E_1).P(E/E_1)+P(E_2).P(E/E_2)}\) = \(\frac{xy.1}{xy.1+(1-x)(1-y).1}\) = \(\frac{xy}{1-x-y+2xy}\)