Explanation
Given $A \cap B = A \cap C$ and $A \cup B = A \cup C$. From the principle of inclusion-exclusion: $|A \cup B| = |A| + |B| - |A \cap B|$ and $|A \cup C| = |A| + |C| - |A \cap C|$. Since $A \cup B = A \cup C$ and $A \cap B = A \cap C$, then $|A \cup B| = |A \cup C|$ and $|A \cap B| = |A \cap C|$. Thus, $|A| + |B| - |A \cap B| = |A| + |C| - |A \cap C|$. This simplifies to $|B| = |C|$. Since $A \cap B = A \cap C$ and $A \cup B = A \cup C$, it means that $B$ and $C$ contain the same elements and therefore are equal to each other ($B=C$).