This integral is of the form \( \int \frac{1}{(px+q)\sqrt{ax^2+bx+c}} dx \).
We use the substitution \( x+2 = 1/t \). Then \( x = 1/t - 2 \).
Also, \( dx = -1/t^2 dt \).
Now substitute these into the integral.
\( \int \frac{1}{(1/t)\sqrt{(1/t-2)^2+(1/t-2)+2}} \cdot (-1/t^2 dt) = \int \frac{-t}{t^2\sqrt{1/t^2 - 4/t + 4 + 1/t - 2 + 2}} dt \).
\( = \int \frac{-1}{t\sqrt{1/t^2 - 3/t + 4}} dt = \int \frac{-1}{\sqrt{t^2(1/t^2 - 3/t + 4)}} dt = \int \frac{-1}{\sqrt{1 - 3t + 4t^2}} dt \).
This is a standard integral of the form \( \int \frac{1}{\sqrt{at^2+bt+c}} dt \). We complete the square for the quadratic.
\( 4t^2 - 3t + 1 = 4(t^2 - \frac{3}{4}t) + 1 = 4(t - \frac{3}{8})^2 - 4(\frac{9}{64}) + 1 = 4(t-\frac{3}{8})^2 - \frac{9}{16} + 1 = 4(t-\frac{3}{8})^2 + \frac{7}{16} \).
The integral becomes \( \int \frac{-1}{\sqrt{4(t-3/8)^2 + 7/16}} dt = \int \frac{-1}{2\sqrt{(t-3/8)^2 + 7/64}} dt \).
Let \( u = t-3/8 \). Then \( du = dt \).
The integral is \( -\frac{1}{2} \int \frac{1}{\sqrt{u^2 + (\sqrt{7}/8)^2}} du \).
This is a standard form for \( \sinh^{-1} \). \( \int \frac{1}{\sqrt{u^2+a^2}}du = \sinh^{-1}(u/a) \).
So, we get \( -\frac{1}{2} \sinh^{-1}(\frac{u}{\sqrt{7}/8}) = -\frac{1}{2} \sinh^{-1}(\frac{t-3/8}{\sqrt{7}/8}) = -\frac{1}{2} \sinh^{-1}(\frac{8t-3}{\sqrt{7}}) \).
Now substitute back \( t = 1/(x+2) \).
\( \frac{8t-3}{\sqrt{7}} = \frac{8/(x+2) - 3}{\sqrt{7}} = \frac{8-3(x+2)}{\sqrt{7}(x+2)} = \frac{8-3x-6}{\sqrt{7}(x+2)} = \frac{2-3x}{\sqrt{7}(x+2)} \).
The final result is \( -\frac{1}{2} \sinh^{-1}\left(\frac{2-3x}{\sqrt{7}(x+2)}\right) + c \).