Transfer modules for closed embeddings Given a map $f:X\to Y$ of smooth complex manifolds, the transfer module $\mathcal D_{X\to Y}$ is the left $\mathcal D_X$-module $\mathcal O_X\otimes_{f^{-1} \mathcal O_Y} f^{-1} \mathcal D_Y$. 
I'm having some trouble understanding the calculation of $\mathcal D_{X\to Y}$ in the very simple setting of a closed embedding. For simplicity's sake, let's consider $i:\mathbb A^1 \to \mathbb A^2$, where $\mathbb A^2$ has coordinates $x$ and $y$ and the image of $i$ is $V(y)$.
Many introductory texts calculate $\mathcal D_{X\to Y}$ by writing $$\mathcal O_X\otimes_{f^{-1} \mathcal O_Y} f^{-1} \mathcal D_Y=k[x,y]/(y) \otimes_{k[x,y]} \mathcal D_Y=\mathcal D_Y/(y\cdot \mathcal D_Y),$$ which can be rewritten as $\mathcal D_X\otimes_k k[\partial/\partial y]$. I don't understand the first equality in the displayed equation: it seems like we're replacing the tensor product over $f^{-1} \mathcal O_Y$, a sheaf of rings on $X$, with a tensor product over $\mathcal O_Y$, a sheaf of rings on $Y$, and similarly with the replacement of $f^{-1} \mathcal D_Y$ by $\mathcal D_Y$. Why is this fair game to do? Is this specific to closed embeddings (or maybe just affine maps)? Can anyone give a formal justification for this first step?
 A: I am writing out my comments with a bit more detail. Let $f \colon X \to Y$ be the inclusion $\mathbf{A}^1 \simeq V(y) \subseteq \mathbf{A}^2$.
First, note that $\mathcal{O}_X \otimes_{f^{-1}\mathcal{O}_Y} \mathcal{D}_Y = f^*\mathcal{D}_Y$ as left $\mathcal{O}_X$-modules by definition. Then, since $f$ is a morphism between affine schemes, we have a natural isomorphism
$$f^*\mathcal{D}_Y \simeq \biggl(\frac{k[x,y]}{(y)} \otimes_{k[x,y]} \Gamma(Y,\mathcal{D}_Y)\biggr)^\sim$$
as left $\mathcal{O}_X$-modules by [Hartshorne, Prop. II.5.2(d)] or [EGAI, Prop. 1.6.5]. The right-hand side can be identified with $(\Gamma(Y,\mathcal{D}_Y)/(y \cdot \Gamma(Y,\mathcal{D}_Y)))^\sim$, again as left $\mathcal{O}_X$-modules, so you can interpret the rest of your chain of equalities as what happens when you omit $(-)^\sim$ from the notation.
To justify the comment about global sections, we have a natural isomorphism $\Gamma(\operatorname{Spec} A,\widetilde{M}) \simeq M$ as $A$-modules for every commutative ring $A$ and every $A$-module $M$ [Hartshorne, Prop. II.5.1(d); EGAI, Thm. 1.3.7], hence the global sections of $f^*\mathcal{D}_Y$ are indeed $k[x,y]/(y) \otimes_{k[x,y]} \Gamma(Y,\mathcal{D}_Y)$.
Finally, we can use the naturality of the isomorphisms to see that the left $\mathcal{D}_X$-action on $\mathcal{O}_X$ does indeed give rise to a left $\mathcal{D}_X$-module structure on $f^*\mathcal{D}_Y$, and similarly the right-$\mathcal{D}_Y$-action on $\mathcal{D}_Y$ does indeed give rise to a right $\mathcal{D}_Y$-module structure on $f^*\mathcal{D}_Y$. For this, you consider how multiplication by a section of $\mathcal{D}_X$ (resp. $\mathcal{D}_Y$) corresponds to an endomorphism of $\mathcal{O}_X$ (resp. $\mathcal{D}_Y$).
