Let $X_1$ and $X_2$ be binomial random variables with respective parameters $n_1, p_1$ and $n_2, p_2$. Show that when $n_1$ and $n_2$ are large, an approximate level $\alpha$ test of $H_0 : p_1 = p_2$ versus $H_1 : p_1 \neq p_2$ is as follows, reject $H_0$ if $$ \frac{|X_1/n_1-X_2/n_2|}{\sqrt{\frac{X_1+X_2}{n_1+n_2} \left( 1 - \frac{X_1+X_2}{n_1+n_2}\right) \left(\frac{1}{n_1}+\frac{1}{n_2}\right)}} > z_{\alpha/2} $$ Hint below in screenshot.
My attempt
Given $H_0$ is true I can say that $p = p_1 = p_2$ and since $n_1$ and $n_2$ are large, I can use the normal approximation to the binomial to say that
$$ V = \frac{X_1 - n_1 p}{\sqrt{n_1 p q}} = \frac{ \frac{X_1}{n_1} - p}{\sqrt{\frac{p q}{n_1}}} \, \dot\sim \, N(0,1)$$
$$ W = \frac{X_2 - n_2 p}{\sqrt{n_2 p q}} = \frac{ \frac{X_2}{n_2} - p}{\sqrt{\frac{p q}{n_2}}} \, \dot\sim \, N(0,1)$$
Then we have $\frac{V-W}{\sqrt{2}} \dot\sim N(0,1)$ and we can build a two sided hypothesis using the fact that
$$P \left( -z_{\alpha/2} \le \frac{V-W}{\sqrt{2}} \le z_{\alpha/2} \right) = 1-\alpha $$
The book answer seems superior because you don't need to know $p_1$ or $p_2$. However I'm having difficulty getting rid of those two values. Thanks for your help and patience!
Book problem with hint