This question already has an answer here:
Let $R$ and $S$ be commutative rings. Let $x, y$ be indeterminates, and assume that one has an isomorphism $R[x] \rightarrow S[y]$ (not necessarily mapping $x$ to $y$ of course). Does this imply $R \cong S$? If not, what is a counterexample?
This may seem like a homework problem, but is not.