Step 1: Understand the probability of truth.
The probability that A and B agree on the truth is the product of their individual probabilities of speaking the truth, plus the probability that they both lie.
Step 2: Conclusion.
Thus, the probability that the statement is true is \( 1 - x + 2xy \).
Final Answer:
\[
\boxed{1 - x + 2xy}
\]