Let $C,D\subseteq X$, prove that $(X\setminus C)\cap D=D\setminus C$. Let $C$ and $D$ be subsets of $X$. Prove that
$$(X\setminus C)\cap D=D\setminus C$$
My workings: Showing two sets are equal amounts to showing inclusion both ways so I want to show
$$(X\setminus C)\cap D\subseteq C$$
and
$$(X\setminus C)\cap D\supseteq D\setminus C$$
For the first one I did the following. Let $x\in (X\setminus C)\cap D$, then $x\in(X\setminus C)$ and $x\in D$. This implies that $x\in X$, $x\notin C$ and $x\in D$. Because $D\subseteq X$ this is equivalent to saying $x\in D$, $x\notin C$. Therefore $x\in D\setminus C$. this shows that $(X\setminus C)\cap D\subseteq D\setminus C$.
For the second part I ran into some trouble. This time let $x\in D\setminus C$. Then I thought since $D\subseteq X$ this implies $D\cap X=D$ and we can say $x\in (X\cap D)\setminus C$. I just don't know if this is completely correct to say, and it also doesn't finish the argument. 
If anyone could help me out with this last part I would be grateful. Also it is very possible that the arguments in the first are not rigorous enough, if so please feel free to point out where I could improve. Thanks
 A: $X \setminus C = C^C$.
$X \setminus C \cap D = C^C \cap D = D \setminus C$.
A: Your first inclusion looks fine.
For the second, your thought pattern is fine; just need to put it in notation...we simply "commute" the "anded" statements.
$
\begin{align}
x \in D \setminus C &\implies x \in D\;\text{ and}\;x \notin C  \\ \\
&\implies x \in D \cap X = D\;\text{ and}\;x \notin C \\ \\
& \implies x \in D \text{ and}\; x \in X\;\text{ and}\;x \notin C \\ \\
&\implies x \in X\;\text{ and}\;x\notin C\;\text{ and}\;x \in D \\ \\
& \implies x \in (X\setminus C)\;\text{ and}\;x \in D \\ \\
& \implies x \in (X\setminus C)\cap D
\end{align}
$
So we've shown that $x \in D\setminus C \implies x\in (X\setminus C)\cap D$
Hence, $\;D\setminus C \subseteq (X\setminus C)\cap D$
A: The first direction is well-handled. For the other direction, essentially the same argument works. 
You want to prove if $x\in D\setminus C$, then $x$ is in $(X\setminus C)\cap D$. This is immediate, since $x$ is in $D$, in $X$ of course because $D$ is a subset of $X$, but not in $C$. 
A: An alternative is to do the following direct calculation:$$
\begin{align*}
& (X \setminus C) \cap D = D \setminus C \\
\equiv & \;\;\;\;\;\text{"extensionality"} \\
& \langle \forall x :: x \in (X \setminus C) \cap D \;\equiv\; x \in D \setminus C \rangle \\
\equiv & \;\;\;\;\;\text{"definition of $\cap$; definition of $\setminus$, twice"} \\
& \langle \forall x :: x \in X \land x \notin C \land x \in D \;\equiv\; x \in D \land x \notin C \rangle \\
\equiv & \;\;\;\;\;\text{"logic"} \\
& \langle \forall x :: x \notin C \land x \in D \;\Rightarrow\; x \in X \rangle \\
\equiv & \;\;\;\;\;\text{"$x \in D \Rightarrow x \in X$, since $D \subseteq X$"} \\
& \mathrm{true} \\
\end{align*}
$$
This shows that the assumption that $C \subseteq X$ is not necessary for this proof.
