Solution (source code)

= Solution

An isomorphism $\phi:X\to Y$ of affine varieties and its inverse $\psi$ pull <regular functions> back to <regular functions>. By the preceding identification this gives <k-algebra homomorphisms>
$$
\phi^*:A(Y)\to A(X),\quad h\mapsto h\circ\phi,
\qquad \psi^*:A(X)\to A(Y).
$$
They preserve sums, products, and every constant in $k$. Contravariance of pullback and $\psi\circ\phi=\operatorname{id}_X$, $\phi\circ\psi=\operatorname{id}_Y$ give $\phi^*\psi^*=\operatorname{id}_{A(X)}$ and $\psi^*\phi^*=\operatorname{id}_{A(Y)}$. Hence
$$
\boxed{A(X)\cong A(Y)\text{ as }k\text{-algebras}}.
$$