Localization of the sheaf of relative differentials Let $f:X\rightarrow Y$ be a morphism of schemes and let $\Omega_{X/Y}$ be the sheaf of relative differentials. Then, given a point $x\in X$, what can we say about $(\Omega_{X/Y})_x$?
In Hartshorne, Chapter 2 - Remark 8.9.2, he says:

The derivations $d:B\rightarrow \Omega_{B/A}$ glue together to give a map $d:\mathcal{O}_X\rightarrow \Omega_{X/Y}$ of sheaves of abelian groups on $X$, which is a derivation of the local rings at each point.

What I understood from the final line is $(\Omega_{X/Y})_x\cong \Omega_{\mathcal{O}_{X,x}/\mathcal{O}_{Y,f(x)}}$. But, this does not seem to make sense to me because if we take a morphism of rings $A\rightarrow B$ and a prime ideal $p\subset B$ then Hartshorne's Proposition 8.2A in the same chapter tells us that $(\Omega_{B/A})_p\cong \Omega_{B_p/A}$ and not $\Omega_{B_p/A_{q}}$, where $q=p^c$, the contraction of p.
 A: Actually, $\Omega_{B_p/A}=\Omega_{B_p/A_q}$ in your case!
More generally, if $A\to B$ is a morphism of rings and $S\subset A$ is a multiplicatively closed subset of elements which all map to invertible elements, then $\Omega_{B/A}=\Omega_{B/S^{-1}A}$. We can prove this by looking at what happens to $1=\varphi(s)\varphi(s)^{-1}$ when taking $d$: $$d(1)=d(\varphi(s)\varphi(s)^{-1})$$ $$0=\varphi(s)d(\varphi(s)^{-1})+\varphi(s)^{-1}d(\varphi(s))$$ $$0=\varphi(s)d(\varphi(s)^{-1})$$ $$0=d(\varphi(s)^{-1})$$
where we've used the Leibniz rule, the fact that $d(\varphi(a))=0$ for any $a\in A$, and the fact that $\varphi(s)$ is invertible.
A: In general if $\phi: A \rightarrow B$ is a map of commutative unital rings and $S \subseteq A$ is a multiplicative set with $T:=\phi(S)$ it follows there is a canonical map
$$\Omega^1_{B/A} \rightarrow \Omega^1_{T^{-1}B/S^{-1}A}.$$
The multiplication map $m: B\otimes_A B \rightarrow B$ has kernel $I(B)$ and there is a canonical map
$$I(B) \rightarrow I(T^{-1}B)$$
inducing a map
$$\Omega^1_{B/A}:=I(B)/I(B)^2 \rightarrow I(T^{-1}B)/I(T^{-1}B)^2:= \Omega^1_{T^{-1}B/S^{-1}A}.$$
You may tensor this with $T^{-1}B$ and get an isomorphism
$$\phi_S: T^{-1}B\otimes_B \Omega^1_{B/A} \cong  \Omega^1_{T^{-1}B/S^{-1}A}.$$
This is Ex.25.4 in Matsumuras book.
Question: "What I understood from the final line is (ΩX/Y)x≅ΩOX,x/OY,f(x). But, this does not seem to make sense to me because if we take a morphism of rings A→B and a prime ideal p⊂B then Hartshorne's Proposition 8.2A in the same chapter tells us that (ΩB/A)p≅ΩBp/A and not ΩBp/Aq, where q=pc, the contraction of p."
Example: In general $f:X\rightarrow Y:=Spec(A)$ is any map of schemes, and if $x\in X$ is any point, let $x\in U:=Spec(B) \subseteq X$ be any open affine subsheme containing $x$ and let $\mathfrak{p}\subseteq B$ be the prime ideal of $x$. It follows
$$\mathcal{O}_{X,x}\cong B_{\mathfrak{p}} \text{ and }(\Omega^1_{X/Y})_x \cong (\Omega^1_{B/A})_{\mathfrak{p}}.$$
In particular if $\mathfrak{p}\subseteq B$ with $\mathfrak{q}:=\mathfrak{p}\cap A$ you get a canonical isomorphism
$$(\Omega^1_{X/Y})_x \cong(\Omega^1_{B/A})_{\mathfrak{p}}:=\Omega^1_{B/A}\otimes_B B_{\mathfrak{p}} \cong \Omega^1_{B_{\mathfrak{p}}/A_{\mathfrak{q}}} \cong \Omega^1_{\mathcal{O}_{X,x}/\mathcal{O}_{Y,f(x)}}.$$
