Solution 1:

If you're willing to assume that $\sigma(\sigma(X)\cup \mathcal{H})$ is independent of $\sigma(\mathcal{G})$ and that $X$ is integrable, then the assertion is indeed true. We need to show that $$ E[X\mid \sigma(\mathcal{G}\cup\mathcal{H})]=E[X\mid\mathcal{H}], $$ that is, we need to show that $E[X\mid\mathcal{H}]$ can serve as the conditional expectation of $X$ given $\sigma(\mathcal{G}\cup\mathcal{H})$, i.e. show that

  • $E[X\mid\mathcal{H}]$ is $\sigma(\mathcal{G}\cup\mathcal{H})$-measurable,
  • $E[X\mid\mathcal{H}]$ is integrable,
  • for all $A\in\sigma(\mathcal{G}\cup\mathcal{H})$: $$\int_A E[X\mid\mathcal{H}]\,\mathrm dP=\int_A X\,\mathrm dP.$$

The first two are obvious. For the third, note that (by linearity, we can assume that $X$ is non-negative) $$ \sigma(\mathcal{G}\cup\mathcal{H})\ni A\mapsto \int_AE[X\mid\mathcal{H}]\,\mathrm dP $$ and $$ \sigma(\mathcal{G}\cup\mathcal{H})\ni A\mapsto \int_A X\,\mathrm dP $$ are two measures defined on $\sigma(\mathcal{G}\cup\mathcal{H})$ with equal total mass being $E[X]$. Hence, it is enough to show that the two measures are identical on some $\cap$-stable generator of $\sigma(\mathcal{G}\cup\mathcal{H})$. Here, we use that $$ \{A\cap B\mid A\in\mathcal{G},\,B\in\mathcal{H}\} $$ is indeed a $\cap$-stable generator of $\sigma(\mathcal{G}\cup\mathcal{H})$ (why?) and hence it suffices to show that $$ \int_{A\cap B} E[X\mid \mathcal{H}]\,\mathrm dP=\int_{A\cap B} X\,\mathrm dP,\quad A\in\mathcal{G},\,B\in\mathcal{H}. $$ Try to show this using the independence assumption. I think it will be clear to you that we in fact need the stronger independence assumption.

A counterexample showing that we indeed need the stronger assumption is the following: Let $U$ and $V$ be i.i.d. symmetric Bernoulli variables (i.e. $P(U=-1)=P(U=1)=\tfrac12$), $\mathcal{G}=\sigma(U)$, $\mathcal{H}=\sigma(V)$ and $X=UV$. Now, one can show that $X$ and $U$ are independent by showing that $$ P(X=a,U=b)=P(X=a)P(U=b) $$ for every combination of $a,b\in \{0,1\}$. But $\sigma(\sigma(X)\cup\sigma(V))$ is not independent of $\sigma(U)$ since for example $$ P(X=1,V=1,U=1)\neq P(X=1,V=1)P(U=1), $$ and hence we do not have the stronger independence assumption. In this case, $$ E[X\mid \sigma(\mathcal{G}\cup\mathcal{H})]=UV\neq E[U]V=E[X\mid\mathcal{H}]. $$

Solution 2:

For a general result, the equation holds under the assumption A2 below, and assumption A2 holds when A1 holds. A1 is the condition mentioned in the other answer.

(A1) $X \vee \mathcal H$ and $\mathcal G$ are independent (where we write $X \vee \mathcal H$ to mean the smallest sub sigma algebra containing both $\sigma(X)$ and $\mathcal H$)

(A2) $X$ and $\mathcal G$ are conditionally independent given $\mathcal H$

(A3) $E(X | \mathcal H \vee \mathcal G) = E(X | \mathcal H)$

In short, A1 ==> A2 ==> A3.

On the other hand, X and $\mathcal G$ being independent does not imply A2 and A2 does not imply independence of X and $\mathcal G$.