The problem requires additional assumption that automorphism are over the base field of $\mathbb{A}^1$. Consider $\mathbb{A}^1_{\mathbb{C}}$. It has an automorphism corresponding to a map $u: \mathbb{C}[x] \to \mathbb{C}[x], u(x) = x, u(a) = \overline{a}$ for $a \in \mathbb{C}$. This is automorphism of $\mathbb{C}[x]$ not having a form $x \mapsto ax + b$.
Anyway, such automorphisms $f: \mathbb{A}^1 \to \mathbb{A}^1$ are in 1-1 correspondence with isomorphisms $g: k[x] \to k[x]$ of the coordinate ring that keeps $k$ still. Any map $k[x] \to k[x]$ over $k$ is determined by the image of $x$. I claim any automorphism $g: k[x] \to k[x]$ must satisfy $\deg g(x) = 1$. Otherwise, either $\deg g(x) = 0$, so $g(x) \in k$, from which it follows that the image of $g$ is $k$, and so $g$ is not isomorphism. On the other hand, if $\deg g(x) > 1$, it can be proved easily that that for any $w \in k[x]$, $\deg g(w) = \deg w \deg g(x)$. This is never equal to 1 -- either $\deg w \geq 1$, then $\deg w \deg g(x) \geq \deg g(x) > 1$, or $\deg w = 0$, then $\deg w \deg g(x) = 0$. In any case, there is no $w \in k[x]$ such that $\deg g(w) = 1$, which means that $g$ is not surjective.
We obtained that $\deg g(x) = 1$, so $g$ must have form $g(x) = ax + b$ for $a \ne 0$.