In Hartshorne's "On the de Rham cohomology of algebraic varieties", he defines algebraic de Rham cohomology of a variety $X$ over a field $k$ of characteristic zero by choosing a closed immersion $X \hookrightarrow Y$ into a smooth variety $Y$, completing the de Rham complex $\Omega^{\bullet}_{Y}$ of $Y$ along $X$ to get a complex ${\widehat{\Omega}}^{\bullet}_{Y}$ of sheaves on $X$, and then taking hypercohomology of that complex.

He then has to show that the result is independent of the embedding $X \hookrightarrow Y$. In particular, if $X$ were already smooth, then one could choose the identity embedding $X=X$ as well as some other embedding $X \hookrightarrow Y$ and then you expect the natural map of complexes ${\widehat{\Omega}}^{\bullet}_{Y} \rightarrow \Omega^{\bullet}_{X}$ to be a quasi-isomorphism.

Hartshorne's proof of independence involves various steps, one of which is considering the case of a smooth hypersurface in a smooth affine variety. He gives an argument in this case on page 25, but it seems to me that he is using the Kahler differentials of the completion rather than the completion of the Kahler differentials, although I could be wrong. So I'm not sure that the argument is correct.

More precisely, he proves a lemma that if $A$ is a Noetherian $k$-algebra complete with respect to the $x$-adic topology, $x \in A$ a non-zero divisor and $A/x=B$ is formally smooth, then $A \simeq B[[x]]$.

This much I believe.

Then he claims further that any $\omega \in \Omega^{p}_{A}$ can be written uniquely in the form

$$\alpha_{0}+\alpha_{1}x+\alpha_{2}x^{2} +\dots + (\beta_{0}+\beta_{1}x+\beta_{2}x^{2}+\dots)dx$$

where $\alpha_{i} \in \Omega^{p}_{B}, \beta_{i} \in \Omega^{p-1}_{B}$.

The notation $\Omega^{p}_{A}$ suggests Kahler differentials of the complete algebra $A$ as opposed to a completion of Kahler differentials on some ambient affine scheme for which $A$ is the completion with respect to some $x$.

So my question is this: which notion of Kahler differentials gives the above unique expression, and how do you see there is such a unique expression?

More generally, how do you see that if $X$ is a smooth variety with an embedding into another smooth variety $X \rightarrow Y$, then the natural map of complexes $\widehat{\Omega}_{Y}^{\bullet} \rightarrow \Omega^{\bullet}_{X}$ is a quasi-isomorphism?