Is this a valid proof that A = B given A ∩ B = A ∪ B?

Your reasoning is perfectly valid. At the point where you use a truth table to show a propositional equivalence you're already looking at one particular $x$ (at a time), so the possibilities you need to consider are just the for rows of your table.

Formally, once you have established the propositional equivalence $$ (p\land q)\leftrightarrow(p\lor q) \quad\equiv\quad p\leftrightarrow q $$ you're now allowed to substitute anything for $p$ and $q$, and it will be a valid equivalence -- even predicate-logic formulas.


(It is a bit the long way around, though. It's faster to see $$ A \subseteq A \cup B = A \cap B \subseteq B $$ and vice versa, so $A\subseteq B$ and $B\subseteq A$, and therefore the sets are equal).


Your proof is fine. That you have shown $(x\in A\land x\in B)\iff(x\in A\lor x\in B)$ is equivalent to $(x\in A)\iff(x\in B)$ extends to all $x$ with no problem; if $\phi(x)$ is equivalent to $\psi(x)$, $\forall x(\phi(x))$ is equivalent to $\forall x(\psi(x))$.


Let me show you a Fitch-style proof corresponding to your (correct)reasoning, to make sure you understand why it is valid:


Given any sets $A,B$ such that $A∩B = A∪B$:

  Given any object $x$:

    $x∈A∩B ⇔ x∈A∪B$.

    Thus $x∈A ∧ x∈B ⇔ x∈A ∨ x∈B$.

    Let $P :≡ x∈A$.

    Let $Q :≡ x∈B$.

    Then $P∧Q ⇔ P∨Q$.

    Thus $P ⇔ Q$.   [by the truth-table you gave]

    Thus $x∈A ⇔ x∈B$.

  Therefore $A = B$.


Note that you perform the same reasoning for any given object $x$, so even though the $P,Q$ in the above proof may differ in truth-value for different $x$, it still holds in every case that $P ⇔ Q$, and hence you get the conclusion you seek. If your instructor cannot understand this, ask him/her to give you any sets $A,B$ such that $A∩B = A∪B$ and any object $x$ and explicitly follow the proof to show (by a single use of the truth-table) that $x∈A ⇔ x∈B$. If it is clear that he/she cannot prevent your conclusion no matter what $A,B,x$ he/she gives you, then you have won. (This is called game semantics, by the way, and I recommend you think of quantifiers this way to fully grasp the meaning of order of quantification.)