automata – Write the Context free Grammar

What will be the context-free grammar of $B= A_1.A_2 $
when $A_1 = {0^n1^n|ngeq 0}$
$A_2 = {1^n0^n|n geq 0}$
Also verify using a string.

if the Grammar for
$A_1$: $S_1 rightarrow 0S_11 | varepsilon$

$A_2$: $S_2 rightarrow 1S_20 | varepsilon$

I am stuck with the value of $S rightarrow$ ?