Note that in order to apply the residue theorem, it is not enough that the function is analytic on the original contour, it has to be analytic on the full contour and its interior, except possibly at a finite number of points.
If we restrict to $x > 0$ we have an analytic function, which can be extended to a meromorphic function
$$f_+(z) = \frac{z^{1/2}}{(z - 4i)(z + 2i)}$$
on the whole plane, but it doesn't coincide with the integrand on the negative real axis. There the integrand can also be extended to a meromorphic function, namely
$$f_-(z) = \frac{(-z)^{1/2}}{(z - 4i)(z + 2i)}.$$
The integral we are interested in, is the sum of the integral of $f_+$ over the positive real axis, and $f_-$ over the negative real axis. We will compute these in two steps.
We turn the positive real axis and the negative real axis into two different closed contours as in these images:
The red line indicates a branch cut, and the branch of the functions has to be fixed in such a way that it coincides with the integrand on the upper edge of the branch cut.
It is not hard to see that in both cases, the integral over the lower edge is equal to that over the upper edge: the square root picks up a minus sign, but the integral is taken in the opposite direction. It is not hard to see either that the integrals over both the small and the big circle segments vanish in the limit, and it follows that the integral over each of the contours is exactly twice the value of the integral we're interested in.
We compute these integrals using the residue theorem: the main thing we have to be careful with is the exact argument of the function values. For $f_+$ we see that the argument of $z$ at the positive imaginary axis is $\pi/2$, and for the negative imaginary axis it is $3\pi/2$, while for $f_-$ the argument of $-z$ (not $z$) at the positive real axis is $-\pi/2$ and at the negative real axis it is $-3\pi/2$.
Now we can compute the residues at the simple poles $4i$ and $-2i$, and we find
$$\operatorname{Res}(f_+, 4i) = \frac{(4i)^{1/2}}{6i} = \frac{2e^{\pi i/4}}{6i}$$
$$\operatorname{Res}(f_-, 4i) = \frac{(-4i)^{1/2}}{6i} = \frac{2e^{-\pi i/4}}{6i}$$
$$\operatorname{Res}(f_+, -2i) = \frac{(-2i)^{1/2}}{-6i} = \frac{\sqrt2 e^{3\pi i/4}}{-6i}$$
$$\operatorname{Res}(f_-, -2i) = \frac{(2i)^{1/2}}{-6i} = \frac{\sqrt2 e^{-3\pi i/4}}{-6i}$$
$2\pi i$ times their sum is the sum of the contour integrals, so half that quantity is your integral:
$$\int_{-\infty}^\infty\frac{|x|^{1/2}}{(x - 4i)(x + 2i)} = \pi\left(\frac23\cos\frac\pi4 - \frac{\sqrt2}3\cos\frac{3\pi}4\right) = \pi\frac{\sqrt2 + 1}3.$$
Best Answer
Substitute $z-1=\frac{1}{w}\implies dz=\frac{-1}{w^2}dw$ and the new contour is $|w|=\frac{2}{3}$ oriented clockwise, so that
$I=\int_{|w|=\frac{2}{3}}\frac{-e^{\frac{w}{w+1}}}{w}dw$
$w=0$ is simple pole inside $|w|=2/3$ and Res{$f(w),w=0$}$=-1$. Hence
$I=-2πi.(-1)=2πi$