= Solution
Fix $A_1\in\mathcal A_1$ and let
$$
\mathcal D_{A_1}
=\left\{B\in\mathcal F:
\mathbb P(A_1\cap B)=\mathbb P(A_1)\mathbb P(B)\right\}.
$$
This is a <Dynkin system>. It contains $\Omega$. If $B\in\mathcal D_{A_1}$, then
$$
\begin{aligned}
\mathbb P(A_1\cap B^c)
&=\mathbb P(A_1)-\mathbb P(A_1\cap B)\\
&=\mathbb P(A_1)(1-\mathbb P(B))\\
&=\mathbb P(A_1)\mathbb P(B^c),
\end{aligned}
$$
so it is closed under complements. Countable additivity gives closure under countable disjoint unions.
The hypothesis says $\mathcal A_2\subseteq\mathcal D_{A_1}$. Since $\mathcal A_2$ is a <pi-system>, <Dynkin lemma> yields
$$
\sigma(\mathcal A_2)\subseteq\mathcal D_{A_1}.
$$
Thus the factorization holds for every $A_1\in\mathcal A_1$ and every $B\in\sigma(\mathcal A_2)$.
Now fix such a $B$ and define
$$
\mathcal E_B
=\left\{A\in\mathcal F:
\mathbb P(A\cap B)=\mathbb P(A)\mathbb P(B)\right\}.
$$
The identical calculation makes $\mathcal E_B$ a Dynkin system. The first step gives $\mathcal A_1\subseteq\mathcal E_B$, so a second application of Dynkin lemma gives
$$
\sigma(\mathcal A_1)\subseteq\mathcal E_B.
$$
Therefore the probability factorization holds for every
$$
A\in\sigma(\mathcal A_1),
\qquad B\in\sigma(\mathcal A_2),
$$
which is precisely independence of the two <independent sigma-algebras>[sigma-algebras]. This is <independence extended from generating pi-systems>.
Back to article page