Proof Verification: $\text{Hom}(\mathbb Z[x],S)=S$ (as rings) How to prove $\text{Hom}(\mathbb Z[x],S)=S$ (as rings), where S is any ring?
My attempt: took an element $b$ in $S$, defined a map , $b: \mathbb Z[x]\to S$ which maps $f(x)$ to $f(b)$. Clearly $b$ is a ring homomorphism, hence we proved one side inclusion.
for other side, take $b$ in $\text{Hom}(\mathbb Z[x],S)$ with the same mapping, since $b$ is a ring homomorphism from $\mathbb Z[x]$ to $S$, clearly $f(b)$ is in $S$. Since $f(x)$ is in $\mathbb Z[x]$, surely $b$ is in $S$.
Is my proof valid?
Also in case to show the generalised result for $n$ variables, can I use induction?
 A: As I understand, you give a map let's call it $\phi : S \rightarrow Hom(\mathbb{Z}[x], S)$ which takes $b \in S$ to the map $\phi_b: \mathbb{Z}[x] \rightarrow S$ which sends a polynomial $p \in \mathbb{Z}[x]$ to $\phi_b(p) = p(b)$. Note $S$ has an identity element, call it $e$, and $\phi_b(1) = e$. To check this map is well defined, for each $b \in S$ we should check $\phi_b$ is indeed a ring homomorphism. So we would show things like $\phi_b(p\cdot q) = (p\cdot q)(b) = p(b)\cdot q(b) = \phi_b(p) \cdot \phi_b(q)$.
To show that this map is indeed a bijection we can construct an inverse. Let's make a map $\psi : Hom(\mathbb Z[x], S) \rightarrow S$. We want $\psi(\phi_b) = b$ so a natural choice for $\psi$ is a map sending any homomorphism $f : \mathbb Z[x] \rightarrow S$ to $\psi(f) = f(x)$ where $x \in \mathbb Z[x]$ is a polynomial.
We have $\psi(\phi_b) = \phi_b(x) = b$ as desired. We just need to show that $\phi_{\psi(f)} = f$ for any $f \in Hom(\mathbb Z[x], S)$. So take any $p \in \mathbb Z[x]$, we have $\phi_{\psi(f)}(p) = p(\psi(f)) = p(f(x)) = f(p)$. The last equality $p(f(x)) = f(p)$ should be justified carefully! And this is the part which (I think) will break when you try to generalise this to $n$ variables.
Addendum for non-unital rings. If $S$ doesn't have an identity then $Hom(\mathbb Z, S)$ may be trivial when $S$ is non-trivial. E.g. Take $S = 2\mathbb Z$ a non-unital ring contained in $\mathbb Z$, then take $ f \in Hom(\mathbb Z[x], S)$. We have $f(1) = 2n$ for some $n \in \mathbb Z$. Since $f$ is a homomorphism of rings, $2n = f(1) = f(1^2) = f(1)^2 = 4n^2$ hence $n = 0$. So $Hom(\mathbb Z[x], S)$ is the zero ring but $S$ is not the zero ring. To avoid these pathologies we have assumed $S$ has an identity element.
