I have exams tomorrow. It would be really helpful if someone helps me. Thank You.
edit : i had tried using the UV rule of integration. but that was getting really lengthy and didn't get any definitive answer. I also tried breaking them down and doing the integration. Again, it was lengthy and the attached image had it done in just one line. So, I came here just to clear this up. Also, I forgot about the formula that the accepted answer mentioned.

We know that $$\int (f (x)+ f'(x))e^x dx = f (x) e^x \tag {1}$$
Here we have $f (x)=\frac {1}{1+x^2} $. Now, let us find the derivative of $f (x) $, that is, $f'(x) $. Using the quotient rule, we have, $$\frac {d}{dx}f (x) = \frac {(1+x^2)\frac {d}{dx}(1)-(1)\frac {d}{dx}(1+x^2)}{(1+x^2)^2} $$ $$=-\frac {2x}{(1+x^2)^2} $$
Now use $(1) $ and we have the result. Hope it helps.