I started with $\displaystyle f(x)=(A+Bx)\sqrt{1+x^2}$.
So, $f(x)+f'(x)=\dfrac{(A+B)+(A+B)x+(2B+A)x^2+Bx^3}{\sqrt{1+x^2}}=\dfrac{1+3x+x^2}{\sqrt{1+x^2}}$.
Equating the coefficients of like powers of $x$, $B=0$. But then there are two different values of $A$, which is impossible. Does it mean there exists no such $f(x)$? Or am I doing something wrong?
The given ODE is linear and after multiplying by $e^x$ we find that $$D(e^xf(x))=e^x(f(x)+f'(x))=\frac{(1+3x+x^2)e^x}{\sqrt{1+x^2}}$$ which implies that $$f(x)=f(0)+e^{-x}\int_0^x\frac{(1+3t+t^2)e^t}{\sqrt{1+t^2}}\,dt.$$ I think that the integral has no closed form. Where does this ODE come from?