Question is to integrate this: $$\int \frac{x+2}{(x^2+3x+3) \sqrt{x+1}} dx$$
Naturally I put $x+1 = t^2$, $dx = 2tdt$
$$2\int\frac{(t^2+1)}{t^4+t^2+1}dt = 2\int \frac{1+t^{-2}}{t^2+1+t^{-2}}= 2\int \frac{1+t^{-2}}{(t-t^{-1})^2 + 3}$$
so answer is $$\dfrac{2}{\sqrt 3} \tan^{-1}\left(\dfrac{t^2-1}{t\sqrt{3}}\right)$$
But answer is not matching with wolfram alfa, choose to oppose. It gives complex thrillers. https://www.wolframalpha.com/input/?i=integrate+(t%2B2)%2F((t%5E2%2B3t%2B3)(sqrt(t%2B1)))+dt
Also I tried a website known as "Online Integral Calculator" which gives the answer as $$\dfrac{2\left(\arctan\left(\frac{2\sqrt{t+1}+1}{\sqrt{3}}\right)+\arctan\left(\frac{2\sqrt{t+1}-1}{\sqrt{3}}\right)\right)}{\sqrt{3}}$$
which I addded the inner terms to get negative of my original answer!
In principle the way to check an antiderivative is to differentiate it and see if the result is (or can be simplified to be) the function you're integrating. Your answer, expressed in terms of $t = \sqrt{x+1}$, is
$$ \frac{2}{\sqrt{3}} \tan^{-1} \left(\frac{x}{\sqrt{3(x+1)}}\right)$$ and its derivative is indeed $$ \frac{x+2}{(x^2+3x+3)\sqrt{x+1}}$$ so your answer is correct.
However, the answer may also be written in other ways. For example, Maple's answer is $$ \frac{2}{3}\,\sqrt {3}\tan^{-1} \left( \frac{ \left( 2\,\sqrt {x+1}-1 \right) \sqrt {3}}{3} \right) +\frac23\,\sqrt {3}\tan^{-1} \left( \frac{ \left( 2\,\sqrt {x+1}+1 \right) \sqrt {3}}3 \right) $$ which is also correct.
EDIT: In fact it turns out that $$\tan^{-1} \left( \frac{ 2\,\sqrt {x+1}-1 }{\sqrt{3}} \right) +\tan^{-1} \left( \frac{ 2\,\sqrt {x+1}+1 }{\sqrt{3}} \right) - \tan^{-1}\left(\frac{x}{\sqrt{3(x+1)}}\right) = \frac{\pi}{2} $$
Note that $$\tan(\arctan(a)+\arctan(b)) = \frac{a+b}{1-ab}$$