(Reposted from here and will be removed on this site if answered on MSE)
I have been trying to prove that $$ P_\ell(\cos\gamma)=\frac{4\pi}{2\ell+1}\sum_{m=-\ell}^\ell Y_{\ell m}^{*}(\theta', \phi')Y_{\ell m}(\theta, \phi) $$ for $\cos\gamma=\cos\theta\cos\theta'+\sin\theta\sin\theta'\cos(\phi'-\phi)$, where $P_\ell$ denote the Legendre polynomials defined as $$ P_\ell(x)=\frac{1}{2^\ell\ell!}\frac{\partial^\ell}{\partial x^\ell}(x^2-1)^\ell $$ and $Y_{\ell m}$ are the spherical harmonics: $$ Y_{\ell m}(\theta, \phi)=\sqrt{\frac{2\ell+1}{4\pi}\frac{(\ell+m)!}{(\ell-m)!}}P_\ell^m(\cos\theta)e^{im\phi} $$ and, finally, $P_\ell^m$ are the associated Legendre polynomials, written as (for $m>0$) $$ P_\ell^m(x)=(-1)^m(x^2-1)^{m/2}\frac{\partial^m}{\partial x^m}P_\ell(x). $$
I cannot find any derivation online that does not make use of a group theoretic argument. Is there any elementary proof of this? Thanks!