Isomorphism between affine varieties 
I am working with a ring and I am trying to show it is not isomorphic (as $k$-algebra) to another ring: $k[x,y,z]/\langle xy-z^2\rangle$ and $k[u,w]$.

What I tried so far was. I aim for a contradiction assuming they can be isomorphic then I looked at how elements in the first ring look like. I got if $ p \in k[x,y,z]/<xy-z^2>$ then  I think it should look like then $p(x,y,z)= q(x,y,z)(xy-z^2)+zg(x,y)$ because I was thinking that each $z^2=xy$ thus we can get rid of all but one z in the remainder. This is where I am
 A: Note that $z$ is irreducible in your ring, but dividing out $z$ gives you $k[x,y]/(xy)$ which is not a domain. Hence $z$ is not prime, so your ring is not factorial. In particular not isomorphic to a polynomial ring.
A: The first ring is smooth and the second is not (it has a singularity at the origin). This can be computed by the Jacobian criterium.
A: Both the other answers are fine, but your elementary approach should also work.
Consider any homomorphism $\phi : k[u,w] \to k[x,y,z]/(xy - z^2)$.  Both rings are generated by degree-one elements, so if this were an isomorphism, it would have to be one-to-one on degree-one polynomials.  But the first ring has only a two-dimensional degree-one subspace, while the second ring has a three-dimensional degree-one subspace.  So $\phi$ cannot be surjective.
(By the way, I think what you meant to write was something like this. Elements of the first ring can be written as $q(x,y) + z g(x,y)$, with multiplication defined by $(q_1 + z g_1 ) ( q_2 + z g_2 ) = q_1 q_2 + xy g_1 g_2 + z (q_1 g_2 + g_1 q_2)$.  This is just replacing all occurences of $z^2$ with $xy$, as you suggested.)
