$$\{X=Y\} \subseteq [(X\in B)\triangle (Y\in B)]^C$$
Suppose $\omega \in \{X=Y\}$. To show that $\omega \in [(X\in B)\triangle (Y\in B)]^C$.
We have to show that $\omega$ belongs to both of the following sets
$X \in B \cup Y \notin B$
$X \notin B \cup Y \in B$
For $X \in B \cup Y \notin B$, we have two cases by $X$: $X(\omega) \in B$ or $X(\omega) \notin B$
If $X(\omega) \in B$, then $\omega$ belongs to $X \in B \cap Y \notin B$.
If $X(\omega) \notin B$, then $Y(\omega) \notin B$ and hence $\omega$ belongs to $X \in B \cap Y \notin B$.
For $X \notin B \cup Y \in B$, we again have two cases by $X$: $X(\omega) \in B$ or $X(\omega) \notin B$
If $X(\omega) \in B$, then $Y(\omega) \in B$ and hence $\omega$ belongs to $X \notin B \cup Y \in B$.
If $X(\omega) \notin B$, then $\omega$ belongs to $X \notin B \cup Y \in B$.