Let $R$ be commutative ring with $1$. Let $f \in R$. Suppose $f$ is not nilpotent in $R$. We need to show $R_f \cong R[x]/(fx-1)$, with $D = \{f^n: n \ge 0\}$ and where $R_f = D^{-1}R$. I am given the following hint: [Show that the map $\phi : R[x] \to R_f$ gives a surjective ring homomorphism and the universal property in Theorem 36 gives an inverse.]
Theorem 36: Let $R$ be a commutative ring with 1 and let $D$ be a multiplicatively closed subset of R containing 1. Then there is a commutative ring $D^{-1}R$ and a ring homomorphism $\pi: R \to D^{-1}R$ satisfying the following universal property: for any homomorphism $\psi : R \to S$ of commutative rings that sends 1 to 1 such that $\psi(d)$ is a unit in $S$ for every $d \in D$, there is a unique homomorphism $\Psi: D^{-1}R \to S$ such that $\Psi \circ\pi = \psi$.
I'm not sure where to go after I define $\phi$. How does the theorem give me an inverse, and how does that show that the two rings are isomorphic? Help would highly, highly be appreciated.