The false step is
$x\in X\to(x\in A\lor x\in B)\iff(x\in X\to x\in A)\lor(x\in X\to x\in B)\;:$
the lefthand side says that $X\subseteq A\cup B$; the righthand side, on the other hand, says that $X\subseteq A$ or $X\subseteq B$ (or both). The latter is clearly a stronger statement than the former: if $A=\{0\},B=\{1\}$, and $X=\{0,1\}$, the lefthand side is true, but the righthand side is not.
It’s easy to make this kind of mistake when you omit quantifiers. Every statement in your argument really ought to be preceded by $\forall x$; $\forall x\big(x\in X\to(x\in A\lor x\in B)\big)\;,$ for instance, or simply $\forall x\in X(x\in A\lor x\in B)\;.$ This has the form $\forall x\in X\big(\varphi(x)\lor\psi(x)\big)$: every $x\in X$ has at least one of the properties $\varphi$ and $\psi$. Your righthand side, on the other hand, has the form $\forall x\in X\big(\varphi(x)\big)\lor\forall x\in X\big(\psi(x)\big)$: either every $x\in X$ has the property $\varphi$, or every $x\in X$ has the property $\psi$. This no longer allows the possibility that some $x\in X$ have $\varphi$ but not $\psi$, while the rest have $\psi$ but not $\varphi$.