Show that for $|a|<1$: $$\int_0^\infty\frac{x^a}{(x+2)^2}\,dx=\frac{a\pi2^{a-1}}{\sin\pi a}\,.$$
Let $a$ be a complex number such that $\big|\text{Re}(a)\big|<1$. If $J(a)$ is the required integral, then when I use the keyhole contour above, I would get $$(1-e^{i 2\pi a})J(a)=2\pi i\,\text{Res}\left(\frac{z^a}{(z+2)^2},z=-2\right)\,.$$ Now if $t=z+2$, then $$z^2=(t-2)^a=(-2)^a\left(1+\frac{t}{2}\right)^a=2^a\left(1-a\frac{t}{2}+\mathcal{O}(t^2)\right)\,.$$ Therefore, $$\text{Res}\left(\frac{z^a}{(z+2)^2},z=-2\right)=-a(-2)^a,$$ making $$-2ie^{i \pi a}\sin(\pi a) J(a)=2\pi i (-a)(-2)^a=-2\pi i e^{i\pi a}2^a.$$ Hence $$J(a)=\frac{\pi a 2^a}{\sin(\pi a)}.$$ Are there other solutions?

Through the Laplace transform $$ \mathcal{L}(x^a) = \frac{\Gamma(a+1)}{s^{a+1}},\qquad \mathcal{L}^{-1}\left(\frac{1}{(x+2)^2}\right) = s e^{-2s} $$ hence the original integral equals $$ \Gamma(a+1)\int_{0}^{+\infty} s^{-a} e^{-2s}\,ds = 2^{a-1}\Gamma(1+a)\Gamma(1-a)= a 2^{a-1} \Gamma(a)\Gamma(1-a) = \frac{\pi a 2^{a-1}}{\sin(\pi a)} $$ by the reflection formula for the $\Gamma$ function.