In the book Algebra by Hungerford, at page 167, at question 14, it is asked that
Let $R$ be a commutative ring with identity, and $c,b \in R$ with $c$ is unit.Show that the assignment $x \to cx + b$ is a unique automorphism of $R[x]$ that is the identity map on $R$.
However, consider $R = \mathbb{Z}$, $c = 1$, $b = 2$. Then since this assignment is a homomorphism, it must be true that $$x(x+1) \to x^2 + x + 2 = (x+1)(x+3) = x^2 + 4x + 3,$$ which is clearly not true.Therefore, considering the fact that this question is even asked in math overflow, and got answer, what is wrong in my argument ?
Everything is fine. You are transforming by $x \mapsto x+2$ and extending by linearity and distribution. Call the resulting map $\phi: \mathbb{Z}[x] \to \mathbb{Z}[x]$.
With your example you have $$ \phi(x(x+1)) = \phi(x^2+x) = (x+2)^2+(x+2)= x^2+5x+6. $$ On the other hand, $$ \phi(x)\phi(x+1)= (x+2)(x+3) = x^2+5x+6 $$ so yes, they are equal.