So I have this problem f(x)=x^3+x+1 and I need to find the inverse of this function.I know that you have to use differentiation but the problem is I see this solution (f^-1)(3)=1 but I don't understand the steps to reach that conclusion.There was another one (f^-1)(3)=5 and this looked the same but I couldn't reach these result and all I got is f'(x)=3x^2+1.Now what steps do I have to follow?

What differentiation tells you here is that f(x) has an inverse for all x because

$f(x) = x^3 + x + 1 \implies f'(x) = 3x^2 + 1 > 0 \text { for all x.}$

As far as I can see, you are just asked to find the value of the inverse function.

$g(x) = f^{-1}(x) \text { and } f(x) = x^3 + x + 1.$

$f(x) = 3 \implies x^3 + x + 1 = 3 \implies x^3 + x - 2) = 0 \implies$

$x^3 - x^2 + x^2 - x + 2x - 2 = 0 \implies x^2(x - 1) + x(x - 1) + 2(x - 1) = 0 \implies$

$(x - 1)(x^2 + x + 2) = 0.$

Are there any real roots of the quadratic factor? No, because

$1^2 - 4(1)(2) = 1 - 8 = -\ 7 < 0.$

So 1 is the only real root.

$\therefore f(1) = 3 \implies g(f(1)) = g(3) \implies g(3) = 1.$