Prove that "if $A\cap B=A\cap C$ and $A\cup B=A \cup C$, then $B = C$" by contrapositive. I've been trying to prove this for the last $30$ minutes or so, but my proof made me very confused.
I assumed that $B\neq C$, and I have to prove that $A \cap B \neq A \cap C$ or $A \cup B \neq A \cup C$.
Since $B\neq C$ we have two cases:

*

*$x\in B$ and $x\notin C$

*$x\in C$ and $x \notin B$
For case $1$ we have again two subcases

*

*$x\in A$

*$x \notin A$
For subcase $1,$ $x\in A$, we have that $x \in A \cap B$ and $x\notin A \cap C$, which is the desired result.
For subcase $2$ instead I get super confused,  what happens if $x \notin A$? I can't say anything right? Because maybe $A \cap B$ is empty but $A \cap C$ is not, since we just said that $x\in B$, $x \notin A$, and $x \notin C$  without saying anything about weather $A$ and $C$ have any other elements, right? This just means that i can't proceed with the proof anymore and I'm stuck and I have to change "strategy" right?
Please don't give me the solution of the exercises since I want to do it by myself. In case I can't I will ask.
 A: Since $x\notin A$, you can't say anything about $A\cap B$ and $A\cap C$, but what happens with $A\cup B$ and $A\cup C$?
A: Assume $B \neq C$. Then $\exists b \in B: b \not \in C$. Since $b \in B$, $b \in A\cup B$
Now we have two cases:

*

*$b \in A$. Then $b \in A\cap B$. But since $A \cap B = A \cap C$, $b \in C$, too. Contradiction.

*$b \not \in A$. Then $b \in B \setminus A$. But since $A\cup B = A \cup C$, $b \in C$, too. Contradiction.

Note: The condition $B \neq C$ may also happen when $\exists c \in C: c \not \in B$. But since the problem is symmetric, there is no need to see this case.
A: The contrapositive of your original statement states that

Let $A, B$ and $C$ be sets. If $B \neq C,$ then $A \cap B \neq A \cap C$ or $A \cup B \neq A \cup C.$

Proving this statement is the same as proving the statement

Let $A, B$ and $C$ be sets. If $B \neq C$ and $A \cup B = A \cup C,$ then $A \cap B \neq A \cap C.$

Let’s prove this:
Suppose that $B \neq C$ and $A \cup B = A \cup C.$ Let $x \in A \cap B.$ Then $x \in A$ and $x \in B.$ It follows that $x \in A$ and $x \in B.$ Since $B \neq C,$ then $B \not \subseteq C$ or $C \not \subseteq B.$
Case $1:$ $B \not \subseteq C.$

 For elements that can be in both sets, we have that those elements are in both $A \cap B$ and $A \cap C.$ Although, there are elements that are in $B$ and not in $C.$ Without loss of generality, assume that $x$ is the object that is in $B$ and not in $C.$ Then $x \notin C.$ So $x \notin A \cap C.$ Therefore $A \cap B \not \subseteq A \cap C,$ so $A \cap B \neq A \cap C.$

Case $2:$ $C \not \subseteq B.$

 Then we have elements that can be in both sets and some elements that are just in $C$ and not in $B.$ Again, in the former case, those elements will be in both $A \cap B$ and $A \cap C.$ Although, for the elements that are just in $C$ and not in $B,$ we have that these elements belong to $A \cap C$ and not to $A \cap B.$ Therefore, $A \cap B \neq A \cap C.$

