In set theory, to prove $A=B$, is it always necessary to prove that $A\subset B$ and $B\subset A$ I am sorry if this a stupid question. I am currently studying set theory, and one thing that is really annoying me is ways of proving two sets equal. In each and every theorem I have come across, my way of proving it is very simpler and straightforward than how my book does it. In each and every case, even though the theorem is pretty obvious, they always prove that $A\subset B$ and $B\subset A$ to prove that $A = B$. For instance consider this:

Let $A,B,X$ be any three sets. If $A\cap X = B\cap X = \phi$ , and
  $A\cup X = B\cup X$, then prove that $A = B$

Now, when I started proving this, I first observed that $A,X$ are disjoint sets, and $B,X$ are also disjoint sets. And then, I noticed that the second equation is only possible if $A = B$, because of the pair of disjoint sets. This proof seemed to be correct to me. 
However, in each and every theorem, my book takes complicated methods to prove such results, where $A=B$ has to be proved.
So, my question is why we give such importance to subsets if we can take a less simpler way of proving a theorem?
 A: Your reasoning seems correct to me, but a lot of the point of set theory (and indeed mathematics) is to present your proof in such a way that it's unquestionably true.
In this context your proof is fine, because what you're proving is quite simple - but if we were proving something more intricate then formalising the proof is useful.
You don't necessarily need to show that $A \subseteq B$ and $B \subseteq A$ separately: you could, for instance, argue that $x \in A$ iff $x \in (A \cup X) \setminus X$ iff $x \in (B \cup X) \setminus X$ iff $x \in B$, which is essentially your argument but presented in a way I feel is a bit more formal.
A: Proving $A=B$ by $A\subseteq B$ and $B\subseteq A$ is the definition of equality of sets. You can sometimes use known facts about sets to prove new ones, but in this case you are still very new to the subject and probably need to get to the root of things.
Your answer is not full. What does it mean that the equation is possible only if the sets are equal? this is what they want you to prove rigorously, for example:
Let $x\in A$. Then $x\in A\cup X$. By 2nd equation $x\in B\cup X$. Thus $x\in B$ or $x\in X$. Since $x\in A$ we know by the 1st equation that $x\not\in X$. Therefore $x\in B$ and $A\subseteq B$. All the statements were symetric so also $B\subseteq A$ and we are done 
