Question in a proof from Gathmann's notes on Algebraic Geometry: The tangent space. I am studying chapter 10 from Gathmann's notes about algebraic geometry and there is something I don't understand in the following proof.

I don't really understand the equality $\frac{g}{f} = c g$. If I understand well, the aim of this part is to show that $S^{-1}(I(a)/I(a)^2) \subseteq I(a)/ I(a)^2$ so that we can deduce the ismorphism since the other inclusion is trivial. So this equality has to be understood as an equality in $S^{-1}(I(a)/I(a)^2)$, i.e.
$$\frac{g}{f} = \frac{cg}{1} \quad \Leftrightarrow \quad \exists t \in S, ~t(g - cf g) = 0 \text{ in }A(X).$$
But I really don't see how we deduce from the first part that $\exists t \in S, ~t(g - cf g) = 0 $ since $f$ is invertible in $A(X)/I(a)$, not in $A(X)$. Any help ?
 A: Take two arbitrary elements $f\in A(X)/I(a)$ and $g\in I(a)/I(a)^2$. Then, by abuse of notation also denoting some representative of $f$ and $g$ by $f$ and $g$ respectively, we have
$$(f+I(a))(g+I(a)^2) = fg + \underbrace{fI(a)^2}_{\in I(a)^2} + \underbrace{gI(a)}_{\in I(a)^2} + I(a)^3 = fg + I(a)^2, $$
and hence $fg \in I(a)/I(a)^2$ (in the above calculation, read '+I(a)' as 'there is an element in $I(a)$ s.t. the equation holds' and analogously for higher powers).
It is clear that $\frac{1}{f} = c$ in $A(X)/I(a)$. Then by the above argumentation,
$$g\frac{1}{f} = \frac{g}{f} = cg \in I(a)/I(a)^2.$$
The argument this is that if we would localize $I(a)/I(a)^2$ at $S$, the only new elements would be of the form $\frac{g}{f}$ with $f\in S$, but we just showed that they already lay in $I(a)/I(a)^2$, so that localization does not add any new elements.
A: Here is an alternative proof when $A$ is a regular ring: Let $k\rightarrow A$ be a $k$-algebra with $k$ a field and let $\Omega^1_{A/k}:=I/I^2$ with $I \subseteq A\otimes_k A$ the kernel of the multiplication map. Let $\mathfrak{m}\subseteq A$ be a $k$-rational point. It follows $A_{\mathfrak{m}}/\mathfrak{m}_{\mathfrak{m}}\cong A/\mathfrak{m}:=\kappa(x)$ where $x$ is the point corresponding to $\mathfrak{m}$. Let $X:=Spec(A)$. By definition
$T_X=Hom_A(\Omega^1_{A/k}, A)$ is the "tangent module" of $X$. The sheafification $\tilde{T_X}:=\Theta_X$ is the tangent sheaf of $X$, and the fiber $\Theta_{X,x} \otimes _{\mathcal{O}_{X,x}} \kappa(x)$ is by definition the tangent space at the point $x$. If $A$ is a finitely generated and regular ring over $k$ it follows $\Theta_X$ is locally free of finite rank and
you get
$$\Theta_{X,x} \otimes _{\mathcal{O}_{X,x}} \kappa(x) \cong Hom_{\kappa(x)}(\Omega^1_{A/k}\otimes \kappa(m), \kappa(x))  \cong Hom_{\kappa(x)}(I/I^2\otimes \kappa(x), \kappa(x))$$
and
$$I/I^2\otimes \kappa(x) \cong \mathfrak{m}/\mathfrak{m}^2$$
hence
$$\Theta_{X,x}\otimes_{\mathcal{O}_{X,x}} \kappa(x) \cong (\mathfrak{m}/\mathfrak{m}^2)^*.$$
Hence the vector spaces $(\mathfrak{m}/\mathfrak{m}^2)^*$
"patch together" to form a locally trivial finite rank sheaf - the tangent sheaf of $X$.
