Let $Q = R[x,y]$ be the ring of polynomials in $x$ and $y$ over the ring $R$. Then isn't the homomorphism defined by $x\mapsto p_1(x,y), \,\,y\mapsto p_2(x,y)$ an automorphism of $Q$, where $p_1,p_2$ are any distinct polynomials in the ring?
Proof: Let $Q' = R[p_1, p_2]$, which can clearly be identified with a subset of $Q$. Define $\phi : Q' \rightarrow Q$ as sending constant polynomials to themselves, and $p_1 \mapsto x, \,\, p_2 \mapsto y$. Then it must be that $\phi (p(p_1, p_2)) = \phi(\sum_{i\in I} a_i p_1^{i_1} p_2^{i_2}) = \sum_{i\in I} a_i x^{i_1} y^{i_2}$. Is this a homomorphism, let's check: let coefficients of $p$ be $a_i$ and coefficients of $q$ be $b_i$. Let $i,j$ be multi-indexes, e.g. $i = (i_1, i_2)$, and let $i,j\in I$ mean they range over all pairs of non-negative integers. $$ \phi(p + q) = \phi(\sum_{i\in I} (a_i + b_i)p_1^{i_1}p_2^{i_2}) = \sum_{i\in I}(a_i+b_i)x^{i_1}y^{i_2} = \phi(p) + \phi(q) \\ \phi(pq) = \phi(\sum_{i,j \in I} (a_ib_j)p_1^{i_1+j_1}p_2^{i_2 + j_2}) = \sum_{i,j\in I}(a_ib_j)x^{i_1+j_1}y^{i_2 + j_2} = \phi(p) \phi(q) $$ So it appears to be a homomorphism. It's clearly surjective. And if $\phi(p) = \phi(q)$ then $p,q$ have the same degrees and coefficients so it's injective. Since this is an isomorphism of $Q'$ onto $Q$ and $Q' \subset Q$ we actually have an automorphism of $Q$, right? Then the inverse of the automorphism $\phi$ is $\psi$ that was first talked about is also an automorphism.
But take this simple example: $Q = \mathbb{Z}[x,y]$, and $p(x,y) = x^2 - y^3$ and let $\psi$ be given by $x\mapsto x^4, \,\, y\mapsto y^5$. Then there isn't a pre-image of $p$ under $\psi$ contradicting its surjectivity.
So I'm wrong somewhere. Please give a hint. Thanks.