Let $K=S[x]$ be the polynomial ring and $S[[x]]$ be the formal power series ring both with coefficients in $S$. Let ${K}^{(x)}$ be the completion of $K$ by the ideal $I=(x)$ I want to show that $S[[x]]$ are isomorphic ${K}^{(x)}$.
I've defined a map $\phi:S[[x]]\rightarrow {K}^{(x)}$ by $f\rightarrow (f+I,f+I^2,...)$ whichh is clearly a homomorphism by how we add/multiply cosets. I've managed to show that the kernel of $\phi$ is trivial, hence $\phi$ is injective.
I only need to show that $\phi$ is surjective. Taking $(f_1+I,f_2+I^2,...)\in {K}^{(x)}$, I've been told to consider $g=f_1+(f_2-f_1)+(f_3-f_2)+...$ but I don't see How this would show $\phi$ is surjective?
The sequence should be $(f_0+I^0,f_1+I,f_2+I^2,\dotsc)$ is not arbitrary, because it has to satisfy $f_k+I^{k}=f_{k+1}+I^{k}$, that is, $f_{k+1}-f_k\in I^{k}$.
In other words, $f_{k+1}-f_k$ is divisible by $x^{k}$. Thus your $g$ can be (formally) rewritten as $$ g=f_0+xh_1+x^2h_2+x^3h_3+\dots $$ which is a power series because, for each $n$, only a finite number of terms of degree $n$ appear.
The homomorphism $\phi$ should rather be written $$ \phi(f)=(f^{[0]}+I^0,f^{[1]}+I,f^{[2]}+I^2,\dots,f^{[k]}+I^k,\dotsc) $$ where $f^{[k]}$ denotes the truncation of $f$ at degree $k$ (that is, disregarding all monomials of degree $>k$), but the abuse of language $f+I^k$ can be tolerated.
Now if $g=f_0+(f_1-f_0)+(f_2-f_1)+\dotsb$, we have $$ g^{[k]}=f_0^{[k]}+(f_1^{[k]}-f_0^{[k]})+(f_2^{[k]}-f_1^{[k]})+\dots+(f_{k}^{[k]}-f_{k-1}^{[k]})=f_{k}^{[k]} $$ because $f_n^{[k]}-f_{n-1}^{[k]}=0$ for $n>k$.