Edit: In response to the comment, I have rewritten this to explicitly show that we are proving an implication.
We want to prove:
For sets $A,B,C \subset U$, the following implication holds:
$[(A\cap C = B \cap C) \land (A \cup C = B \cup C)]\implies A=B$.
Proof:
Let $A,B,C \subset U$ be arbitrary sets. Assume the following property holds:
$[(A\cap C = B \cap C) \land (A \cup C = B \cup C)]$.
We will show that $A=B$.
Set equality is almost always a 2-part problem: show the inclusion one way, then the other way.
Let $x \in A$ be arbitrary. Either $x \in C$ or $x \notin C$. (This is a proof by cases.)
Case 1: If $x \in C$ then $x \in A\cap C = B\cap C$ so $x \in B$, and we are done.
Case 2: If $x \notin C$ then we still have $x \in A \cup C = B \cup C$. Since $x \notin C$ and $x \in B \cup C$, $x \in B \cup C -C = B$. So $x \in B$.
By cases, $A \subset B$.
By symmetry (or by doing the same exact proof with $A$ and $B$ reversed), we see that $B \subset A$. Thus $A=B$.