The general strategy for proving 2 sets are equal is to prove that all of the elements in the one on the left are also in the one of the right and viceversa

So, let

Then by definition of union, or

If then and by definition of intersection. Therefore

If then and by definition of intersection. Therefore

Now you should try going the other way. Does the question state B is subset of A? or a subset of X, to give the complement meaning?