Write the gamma function $\Gamma(p)$ as
$$
\Gamma(p)=\int_0^{\infty}t^{p-1}\operatorname{e}^{-t}\operatorname{d}\!t=\int_0^{\infty}x^{2p-2}\operatorname{e}^{-x^2}2x\operatorname{d}\!x=2\int_0^{\infty}x^{2p-1}\operatorname{e}^{-x^2}\operatorname{d}\!x
$$
changing the integration variable from $t$ to $x^2$.
Write the product of $\Gamma(p)\Gamma(q)$ as
$$
\Gamma(p)\Gamma(q)=4\int_0^{\infty}\int_0^{\infty}x^{2p-1}y^{2q-1}\operatorname{e}^{-x^2-y^2}\operatorname{d}\!x\operatorname{d}\!y.\tag 1
$$
We now rewrite the (1) in polar coordinates $(r,\theta)$ with $x=r\cos\theta,\,y=r\sin\theta$, $x^2+y^2=r^2$ and Jacobian $J=r$; in the polar coordnates the integration is over the entire first quadrant, i.e. $0\le r <\infty,\,0\le\theta\le \pi/2$. We get
$$\begin{align}
\Gamma(p)\Gamma(q)&=4\int_0^{\pi/2}\int_0^{\infty}(r\cos\theta)^{2p-1}(r\sin\theta)^{2q-1}\operatorname{e}^{-r^2}r\operatorname{d}\!r\operatorname{d}\!\theta\\
&=4\int_0^{\pi/2}\int_0^{\infty}(\cos\theta)^{2p-1}(\sin\theta)^{2q-1}\operatorname{e}^{-r^2}r^{2(p+q)-1}\operatorname{d}\!r\operatorname{d}\!\theta\\
&=4\int_0^{\infty}\operatorname{e}^{-r^2}r^{2(p+q)-1}\operatorname{d}\!r\int_0^{\pi/2}(\cos\theta)^{2p-1}(\sin\theta)^{2q-1}\operatorname{d}\!\theta.
\end{align}
$$
Making the substitution $r^2=t$ in the $r$ integration, we find
$$
\int_0^{\infty}\operatorname{e}^{-r^2}r^{2(p+q)-1}\operatorname{d}\!r=\frac{1}{2}\int_0^{\infty}\operatorname{e}^{-t}t^{(p+q)-1}\operatorname{d}\!t=\frac{1}{2}\Gamma(p+q)
$$
so we have
$$
\Gamma(p)\Gamma(q)=\frac{1}{2}\Gamma(p+q)4\int_0^{\pi/2}(\cos\theta)^{2p-1}(\sin\theta)^{2q-1}\operatorname{d}\!\theta
$$
that is
$$
\frac{\Gamma(p)\Gamma(q)}{\Gamma(p+q)}=B(p,q)=2\int_0^{\pi/2}(\cos\theta)^{2p-1}(\sin\theta)^{2q-1}\operatorname{d}\!\theta.
$$