Set theory - elements not in both finite sets I have an understanding of the below problem but have little experience proving things in set theory so I don't know how to start it.

For any two finite sets $A$ and $B$, define $f(A,B)$ to be the number of elements that are contained either in $A$ or in $B$, but not in both $A$ and $B$.
Three given sets $X,Y$ and $Z$ satisfy $$f(X,Y) = f(Y,Z) = f(Z,X).$$
(a) Prove that $f(X,Y)$ is even.
(b) Find a set $W$ such that $$f(W,X) = f(W,Y) = f(W,Z) = \frac{1}{2} f(X,Y).$$

 A: Answer on a):
$f\left(X,Y\right)+f\left(Y,Z\right)+f\left(X,Z\right)$ gives 
twice the number of elements in $\left(X\cup Y\cup Z\right)\backslash\left(X\cap Y\cap Z\right)$
so is even. Then $f\left(X,Y\right)=f\left(Y,Z\right)=f\left(X,Z\right)$
leads to $f\left(X,Y\right)$ is even.
Second approach:
$f\left(A,B\right)=\left|A\right|+\left|B\right|-2\left|A\cap B\right|$, so:
$f\left(X,Y\right)+f\left(Y,Z\right)+f\left(X,Z\right)=2\left(\left|X\right|+\left|Y\right|+\left|Z\right|-\left|X\cap Y\right|-\left|Y\cap Z\right|-\left|X\cap Z\right|\right)$.
Then $f\left(X,Y\right)=f\left(Y,Z\right)=f\left(X,Z\right)$ gives:
$3f\left(X,Y\right)=2\left(\left|X\right|+\left|Y\right|+\left|Z\right|-\left|X\cap Y\right|-\left|Y\cap Z\right|-\left|X\cap Z\right|\right)$
and consequently $f\left(X,Y\right)$ is even.
Answer on b):
$W=\left(X\cap Y\right)\cup\left(Y\cap Z\right)\cup\left(X\cap Z\right)$ 
Way of working: make a Venn-diagram and define: 
$a:=\left|X\cap Y\cap Z\right|$
$p:=\left|\left(X\cap Y\right)\backslash Z\right|$, $q:=\left|\left(Y\cap Z\right)\backslash X\right|$,
$r:=\left|\left(X\cap Z\right)\backslash Y\right|$
$u:=\left|X\backslash\left(Y\cup Z\right)\right|$,
$v:=\left|Y\backslash\left(X\cup Z\right)\right|$, $w=\left|Z\backslash\left(X\cup Y\right)\right|$
The sets mentioned here are disjoint and their union is $X\cup Y\cup Z$.
Then equality $f\left(X,Y\right)=f\left(Y,Z\right)=f\left(X,Z\right)$
leads to $r+v=p+w=u+q=\frac{1}{2}f\left(X,Y\right)$. 
