If $A$ is a commutative ring with unit, $a \in A $ and $S = \lbrace a^n \mid n \geq 0 \rbrace $ then there is an isomorphism $$S^{-1}A \cong A[x]/(1-ax).$$
In fact we can consider the homomorphism $$\phi : A[x] \to S^{-1}A$$ $$p(x) \mapsto p\left(\frac{1}{a} \right)$$
Then obviously $(1-ax) \subseteq \ker(\phi) $, but why $\ker(\phi) \subseteq (1-ax) $ ?