Let $\cot ^{-1} p=\theta$, then $p=\cot \theta$
$\therefore e^{2 m i \cot ^{-1} p} \cdot\left(\frac{p i+1}{p i-1}\right)^{m}$
$=e^{2 m i \,\theta} \cdot\left(\frac{i \cot \theta+1}{i \cot \theta-1}\right)^{m}$
$=e^{2 m i \,\theta} \cdot\left(\frac{i(\cot \theta-i)}{i(\cot \theta+i)}\right)^{m}$
$=e^{2 m i \, \theta} \cdot\left(\frac{\cot \theta-i}{\cot \theta+i}\right)^{m}$
$=e^{2 m i \,\theta} \cdot\left(\frac{\cos \theta-i \sin \theta}{\cos \theta+i \sin \theta}\right)^{m}$
$=e^{2 m i \,\theta} \cdot\left(\frac{e^{-i \theta}}{e^{i \theta}}\right)^{m}$
$=e^{2 m i} \,\theta\left(e^{-2 i} \theta\right)^{m}$
$=e^{2 m i} \, \theta \times e^{-2 m i} \theta$
$=e^{0}=1$