Prove if $A$ is a subset of $B$, then $A\backslash B= \emptyset$.
I used a proof by contrapostive.
The assumption ($A\backslash B$ not being equal to the empty set) means there exists an $x$ such that $x\in A\backslash B$ implies $x\in A$ and $x\not\in B$. This implies that $A$ is not a subset of $B$.
How is this proof, thanks.
Your proof is correct. You could have avoided using the contrapositive and just proved it directly:
It doesn't really make much of a difference to the structure of the proof, though—the original statement is of the form $p \Rightarrow \neg q$, so its contrapositive is also of the form $q \Rightarrow \neg p$ (where $p$ means '$A \subseteq B$' and $q$ means '$A \setminus B$ is inhabited').
But as a general rule, it's nice not to use indirect proof techniques if you don't have to.