Relationship between algebras of sets

Let $$\mathcal{N}$$ and $$\mathcal{M}$$ be algebras of sets on $$S$$ and $$T$$ respectively. Let $$\mathcal{N}\times\mathcal{M}$$ the algebra generated by the rectangles in $$S\times T$$ (i,e the sets with the form $$A\times B$$ where $$A\in\mathcal{N}$$ and $$B\in\mathcal{M}$$). We denote by $$\mathcal{N}\triangle\mathcal{M}$$ to the $$\sigma$$-algebra generated by the algebra $$\mathcal{N}\times\mathcal{M}$$.

I want to show that, if $$\mathcal{N'}$$ and $$\mathcal{M'}$$ are the $$\sigma$$-algebras generated by $$\mathcal{N}$$ and $$\mathcal{M}$$ respectively then

$$\mathcal{N}\triangle\mathcal{M}=\mathcal{N'}\triangle\mathcal{M'}.$$

It is easy to see that $$\mathcal{N}\triangle\mathcal{M}\subseteq\mathcal{N'}\triangle\mathcal{M'}$$. I have troubles with the other direction. My idea is to show that $$\mathcal{N'}\times\mathcal{M'}\subseteq\mathcal{N}\triangle\mathcal{M}$$ but I don't know how to get the last sentence. Can seomeone give me a hint?

Hint: $$A\times B=(A\times T)\cap(S\times B)$$
Let $$A\in\mathcal N'$$ and $$B\in\mathcal M'$$, then the same $$\sigma$$-construction which produces $$A$$, will produce $$A\times T$$, showing $$A\times T\in \mathcal N\nabla\mathcal M$$. Similarly for $$S\times B$$.