This question originates from Pinter's Abstract Algebra, Chapter 24, G1.
Let $A$ and $B$ be rings and let $h: A\rightarrow B$ be a homomorphism with kernel $K$. Define $\bar{h}: A[x]\rightarrow B[x]$ by
$\quad\bar{h}(a_0 + a_1x +\cdots a_nx^n) = h(a_0) + h(a_1)x +\cdots +h(a_n)x^n$
Prove that $\bar{h}$ is a homomorphism from $A[x]$ to $B[x]$.
Attempt:
Let $a(x), b(x)\in A[x]$, where $\operatorname{deg} a(x)=n, \operatorname{deg} b(x)=m$ and $m\le n$. \begin{align*} \bar{h}(a(x) + b(x)) &= \bar{h}\left(\sum_{k=0}^n a_kx^k + \sum_{k=0}^m b_kx^k\right) \\ &= \bar{h}\left(\sum_{k=0}^n (a_k+b_k) x^k\right) \\ &= \sum_{k=0}^n h(a_k+b_k) x^k \\ &= \sum_{k=0}^n \left(h(a_k) + h(b_k)\right) x^k & \text{by homomorphism of }h \\ &= \sum_{k=0}^n h(a_k)x^k + \sum_{k=0}^m h(b_k)x^k \\ &= \bar{h}(a(x)) + \bar{h}(b(x)) \end{align*} Hence $\bar{h}$ is a homomorphism over addition from $A[x]$ to $B[x]$.
\begin{align*} \bar{h}(a(x)b(x)) &= \bar{h}\left(\left(\sum_{k=0}^n a_kx^k\right) \left(\sum_{k=0}^m b_kx^k\right)\right) \\ &= \bar{h}\left(\sum_{k=0}^{n+m}\left(\sum_{i+j=k}a_ib_j\right)x^k\right) \\ &= \sum_{k=0}^{n+m}h\left(\sum_{i+j=k}a_ib_j\right)x^k \\ &= \sum_{k=0}^{n+m}\left(\sum_{i+j=k}h(a_ib_j)\right)x^k & \text{by homomorphism of }h\text{ over addition} \\ &= \sum_{k=0}^{n+m}\left(\sum_{i+j=k}h(a_i)h(b_j)\right)x^k & \text{by homomorphism of }h\text{ over multiplication} \\ &= \left(\sum_{k=0}^n h(a_k)x^k\right) \left(\sum_{k=0}^m h(b_k)x^k\right) \\ &= \bar{h}(a(x)) \bar{h}(b(x)) \end{align*} Hence $\bar{h}$ is a ring homomorphism from $A[x]$ to $B[x]$.
Correct?
If the ring $A$ is commutative, then everything about your proof is good.
If $A$ is not commutative, then you have to be careful about how you're defining the polynomial ring $A[x]$. If you define polynomials so that the indeterminate $x$ commutes with everything in $A$, then everything in your proof is good. If you define polynomials so that you are not assuming that $x$ commutes with everything in $A$, then you will no longer have
$$\left(\sum_{k=0}^n a_kx^k\right) \left(\sum_{k=0}^m b_kx^k\right) = \sum_{k=0}^{n+m}\left(\sum_{i+j=k}a_ib_j\right)x^k,$$
so your proof will no longer work.
Edit: Actually, there could potentially be one other issue. Let $A$ and $B$ be rings, and let $h:A\to B$ be a ring homomorphism. Some mathematicians define ring homomorphisms so that the definition includes the condition that $h(1_A)=1_B$, where $1_A$ is the multiplicative identity of $A$ and $1_B$ is the multiplicative identity of $B$. If this is the definition of ring homomorphism that you're using, then your proof should also show that $\bar{h}\left(1_{A[x]}\right)=1_{B[x]}$.