Problem
Given two events $A$ and $B$ such that $P(A \cup B)$ and $P(A \cap B)$ are known, find a formula for the probability of exactly one of these two events occurring.
Attempt at a solution
I interpret 'exactly one of these two events occcurring' as the event $C=A \setminus B$ or $D=B \setminus A$.
We have the following equalities $$(1) \space P(A)=P(A \setminus B) + P(A \cap B)$$ $$(2) \space P(B)=P(A \setminus B) + P(A \cap B)$$ $$(3) \space P(A \cup B)=P(B \setminus A)+P(A \cap B)+P(A \setminus B)$$
Since the hypothesis of the problem is that we only know the probability of the union and intersection, I am not so sure how could I derive a formula for $P(B \setminus A)$ and for $P(A \setminus B)$, I can't rely only on equality (3) since I would have one equation and two unknowns, but I don't have $P(A)$ and $P(B)$ as data. Any help would be appreciated.
I think the problem is asking for the probability of the event
$$E=(A\setminus B)\cup(B\setminus A)=(A\cup B)\setminus(A\cap B)=A\triangle B,$$
i.e. the probability that $A$ or $B$ occurs but not both.
We have
$$\Pr(E)=\Pr(A\cup B)-\Pr(A\cap B)$$