Let ($\Omega, A, P$) a probability space and let $\mathrm{F}, \mathrm{G} $ be two independent sub $\sigma$-algebra on $\Omega$ ($\mathrm{F} \subset A$, $\mathrm{G} \subset A$). Suppose then that a r.v. X is measurable from both ($\Omega, F$) $\to $($R, \mathrm{B}$) and ($\Omega, G$) $\to $($R, \mathrm{B}$).
Now, since X is both F and G measurable for any B $\in \mathrm{B}, P(X \in B) = P(X^{-1}($B$) \ \cap \ X^{-1}($B$) = P(X \in B) P(X \in B)= 0$ or $1$.
My interpretation is that, since {$\omega: X(\omega) \in$ B} are both in $\mathrm{G}$ and in $\mathrm{F}$, then I have to measure both these set. What I don't understand is:
1 - why I have to measure the intersection of these set and not the union
2 - why $P(X \in B) P(X \in B)= 0$ or $1$
You take the intersection because deifinition of independence involves intersection. For the second question $x^{2}=x$ implies $x=0$ or $x=1$.