Artificial intelligent assistant

Proof of $ A \cap B = A \iff A \cup B = B$ I tried to see if this was asked here before but I am pretty sure im the first one - I hope I'm right. So I am supposed to show" $$ A \cap B = A \iff A \cup B = B$$ So what I get from this obviously I need to prove both the "if" and "only if" but I get stuck really early: Assumption (1) $$ x \in B $$ Premise (2) $$ A \cup B = B $$ (1)(2) and def. '= ' $$ x \in A\cup B $$ def intersection $$ x \in A \lor x \in B $$ but as you can see this isn't really going anywhere since I cannot derive $A$ from there as I have $\lor$. So my guess is that I need to assume $x \in A$. But then this seems very wishy washy. I would really appreciate any pointers or hints on where to start to tackle this problem in a better way. EDIT: i did indeed switch up A and B on the equal side, but don't think that makes a difference

Show $A \cap B = B \iff B \subseteq A \iff A \cup B = A.$

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 55021f35b89e6fa3b747c63f3f6633a9