Answer
$g(x)=\dfrac{-1}{x}+x^2-1$
Work Step by Step
Since, the derivative of the function is given as: $f'(x)=(\dfrac{1}{x^2}+2x)$
General form of the function will be: $f(x)=\dfrac{-1}{x}+x^2+C$
Here, the graph of the given function passes through $(-1,1)$.
So, $f(x)=\dfrac{-1}{x}+x^2+C$ This implies, $1+1+C=1$ or, $C=-1$
Thus, $g(x)=\dfrac{-1}{x}+x^2-1$