Let $k$ be a field. Then $k[X]\otimes_kk[Y]\approx k[X,Y]$. If $f(X)\in k[X]$ and $g(Y)\in k[Y]$, is it true that $$k[X]/(f(X))\otimes_kk[Y]/(g(Y))\approx k[X,Y]/\langle f(X),g(Y) \rangle, $$ for all polynomioals $f,g$?
My attempt:
I define a map $\phi\colon k[X]/(f(X))\times k[Y]/(g(Y))\longrightarrow k[X,Y]/\langle f(X),g(Y) \rangle$, which takes $(p(X),q(Y))$ to their product. This map is $k$-linear, therefore we get a homomorphism $\widetilde{\phi}\colon k[X]/(f(X))\otimes_k k[Y]/(g(Y))\longrightarrow k[X,Y]/\langle f(X),g(Y) \rangle$ which takes $p(X)\otimes_k q(Y)$ to the product $p(X)q(Y)$. To prove that the last map is an isomorphism I define the inverse of $\widetilde{\phi}$ by $$X\longmapsto X\otimes_k 1\\ Y\longmapsto 1\otimes_k Y.$$