(Full disclosure: this is part of a hw problem). Let $X_1,X_2,\ldots,X_{n+2} \overset{iid}{\sim} N(0,1)$. I'm trying to show that $$\sqrt{ \frac{\sum_{i=1}^{d} X_i^2 }{\sum_{i=1}^{d+2} X_i^2 } }.$$
has the same distribution as $U^{1/n}$ where $U \sim \mathcal{U}([0,1])$.
Here is my attempt: Let $Q = \sqrt{\frac{\sum_{i=1}^{d} X_i^2 }{\sum_{i=1}^{d+2} X_i^2}}$, let $V = \sum_{i=1}^{d} X_i^2$, and let $W = X_{d+1}^2 + X_{d+2}^2$. so that $Q = \sqrt{\frac{V}{V + W}}.$ By definition, we have that $V \sim \chi^2 (d)$ and $W \sim \chi^2(2)$. Then letting $G(q)$ denote the CDF of $Q$, we have \begin{align*} G(q) = P(Q \leq q) &= P \bigg(\sqrt{\frac{V}{V+W}} \leq q \bigg) \\[5pt] &= P \bigg( \frac{V}{V+W} \leq q^2 \bigg) \\[5pt] &= P \bigg( \frac{V+W}{V} \geq \frac{1}{q^2} \bigg) \\[5pt] &= P \bigg( 1 + \frac{W}{V} \geq \frac{1}{q^2} \bigg) \\[5pt] &= P \bigg( \frac{W}{V} \geq \frac{1}{q^2} -1 \bigg) \\[5pt] &= P \bigg( \frac{W}{V} \Big(\frac{d}{2}\Big) \geq \Big(\frac{1}{q^2} -1 \Big)\frac{d}{2} \bigg) \\[5pt] &= P \bigg( \frac{W/2}{V/d} \geq \Big(\frac{1}{q^2} -1 \Big)\frac{d}{2} \bigg) \\[5pt] &= 1 - P \bigg( \frac{W/2}{V/d} \leq \Big(\frac{1}{q^2} -1 \Big)\frac{d}{2} \bigg). \end{align*}
Then we note that $\frac{W/2}{V/d}$ has an $\mathcal{F}$-distribution with parameters (degrees of freedom) $2$ and $d$. Letting $F$ and $f$ denote the CDF and PDF, respectively, of the $\mathcal{F}$-distribution, we have $G(q) = 1 - F\big((\frac{1}{q^2}-1)\frac{d}{2} \, | 2, d \big)$. Therefore, the PDF of $Q$, denoted as $g(q)$, is given by \begin{align*} g(q) &= \frac{d}{dq} \bigg[1 - F \Big( \big(\tfrac{1}{q^2}-1)\tfrac{d}{2} \, | 2,d \big) \Big) \bigg] \\[5pt] &= -f \big( (\tfrac{1}{q^2}-1)\tfrac{d}{2} \,| 2,d \big)(-dq^{-3}) \\[5pt] &= \frac{d}{q^3} f \big( (\tfrac{1}{q^2}-1)\tfrac{d}{2} \,| 2,d \big) \\[5pt] &= \frac{d}{q^3} \cdot \frac{2}{d} \frac{(2/d)^{2/2}}{B(1,\frac{d}{2})} \frac{1}{\big(1+(2/d)q\big)^{(2+d)/2}} \\[5pt] &=\frac{4}{dq^3} \cdot \frac{1}{B(1,\frac{d}{2}) \big(1+(2/d)q\big)^{(2+d)/2}}. \end{align*}
But clearly this is not the distribution of $U^{1/n}$...I don't see where I'm going wrong. Should I be trying a different method? I've contemplated some sort of method using MGFs, but I'm somewhat doubtful that it would work. Any tips/helps would be greatly appreciated!