Let $m,n,p\in (0,+\infty)$ be constants and let $D$ be the region in the plane enclosed by lines $x=0,y=0$ and $x+y=1$. Calculate the following integral: $$\iint\limits_{D}x^{m-1}y^{n-1}(1-x-y)^{p-1}\mathrm{d}x\mathrm{d}y$$
Note: I know how to calculate it by the routine procedure, but the answer computed it in another way: It turned the simplex $D$ into the region $\Omega$ in $\mathbb{R}^3$ which is enclosed by planes $x=0, y=0, z=0$ and $x+y+z=1$, it then claimed that the original integral is equal to $$(p-1)\iiint\limits_{\Omega}x^{m-1}y^{n-1}z^{p-2}\mathrm{d}x\mathrm{d}y\mathrm{d}z $$
But I could not get why the triple integral is equivalent to the original double integral?(I know how to compute the triple integral, but I just can't see how it's equivalent to the double integral.)