Well, to start with the polynomial Ring $A[X]$ has the universal property, that for every morphism $f : A \rightarrow B$ of Rings and every $c \in B$ there is a unique homomorphism $\overline{f}: A[X] \rightarrow B$ which extends $f$ and maps $X$ to $c$. That is, if $p = \sum_{i = 1}^n a_i X^i$ is given, we have $\overline{f}(p) = \sum_{i = 1}^n f(a_i) c^i.$ In your case, you can take $B = A[X]$, $f: A \rightarrow A[X]$ the canonical inclusion and $c = a X + b$. Now the only thing left to be proved is that this is indeed a bijection. This can be done by explicitly stating the inverse and here you will need that $a$ is a unit.