If the formula for a hypothesis test is
$$ z = \frac{\bar{x}_1 - \bar{x}_2}{\sqrt{\frac{\sigma^2_{x_1}}{n_{x_1}} + \frac{\sigma^2_{x_2}}{n_{x_2}}}} $$
And the variance for a binomial variable is given by the equation
$$ \sigma^2 = np(1-p) $$
Then why is the sum of the variances given by
$$ \sigma_{x_1 - x_2} = \sqrt{\frac{p_1(1-p_1)}{n_{x_1}} + \frac{p_2(1-p_2)}{n_{x_2}}} $$
Rather than
$$ \sigma_{x_1 - x_2} = \sqrt{p_1(1-p_1)+ p_2(1-p_2)} $$