Consider a homomorphism $f: A\to B$ of commutative rings and let $b\in B$. Let $g\colon A[X]\to B[X]$ be defined by $g(X) = X$. Put $I = g^{-1}((bX-1))$ (contraction of the ideal $(bX-1)\subseteq B[X]$) and suppose that $I +(X) = (1)$. I want to prove that $b$ is integral over $A$.
I think the integral equation for $b$ can be found by considering a polynomial $P\in I$ which is $1\pmod X$ and then taking its reciprocal polynomial (by this I mean the polynomial where the coefficient $c_i$ of $P$ is replaced by $c_{\text{deg} P - i}$). Is this correct, and is there a different proof showing the integrality of $b$? Thanks in advance!
PS I came up with this question after doing the following exercise on affine schemes: if $f^*\colon Spec(B)\to Spec(A)$ is universally closed, then $f$ is integral. In this case I can prove that for $b\in B$ it holds that $I +(X) = (1)$ (where $I$ is defined as above).
Since $B[X]/(bX-1)=B[b^{-1}]$, we have $I = \{P \in A[X] : P(b^{-1})=0\}$. Choose $P \in I$ and $Q \in A[X]$ with $1-P = X Q$. Then $Q(b^{-1})=b$ holds in $B[b^{-1}]$. If $n$ is the degree of $Q$, multiply this equation with $b^n$. It gives an integral equation of degree $n+1$ for $b$. Although this equation only holds in $B[b^{-1}]$, it may be multiplied with a certain power of $b$ to become an equation in $B$.