I'm supposed to find inverse to the polynomial:

$ x^2+1+(f)$ in $Q[x]/((f),+,*)$

and $f=x^3+5$.

I know the solution somehow involves extended Euclidean algorithm, but generally don't know what to do. I tried to find the coefficients for Bezout identity which worked, but don't know how to continue.

Can somebody help me with this?