By definition, if $x \neq 0$, then
$$x^{-n} = \frac{1}{x^n}$$
Thus,
$$x_1^{-\frac{1}{2}} = \frac{1}{x_1^{\frac{1}{2}}}$$
If we make the substitution $n = -m$ in the equation
$$x^{-n} = \frac{1}{x^n}$$
we obtain
$$x^{m} = \frac{1}{x^{-m}}$$
Hence,
$$\frac{1}{x_2^{-\frac{1}{2}}} = x_2^{\frac{1}{2}}$$
Therefore, we can rewrite the equation
$$\frac{x_1^{-\frac{1}{2}}}{x_2^{-\frac{1}{2}}} = \frac{p_1}{p_2}$$
in the form
$$\frac{x_2^{\frac{1}{2}}}{x_1^{\frac{1}{2}}} = \frac{p_1}{p_2}$$
which we can solve for $x_2$ by multiplying both sides by $x_1^{\frac{1}{2}}$ to obtain
$$x_2^{\frac{1}{2}} = \frac{p_1x_1^{\frac{1}{2}}}{p_2}$$
then squaring both sides to obtain
$$x_2 = \frac{p_1^2x_1}{p_2^2}$$