The question arised when considering the equivalence: $A$ is a field if and only if $A[x]$ is a PID. Now, I know the only if part. The if part should go like this:
For any $a\in A\setminus\{0\}$, let $(a,x)=(p(x))$. Because $a\in (p(x))$ we have $p(x)=b\in A $, besides $x\in (b)$ implies $b\in A^*$ and thus $(a,x)=(b)=A[x]$. In particular $1\in (a,x) $, hence $a\in A^*$. Therefore $A $ is a field.
Is it correct?
But here's the main point of my question. My book mentions a contrapositive approach: if $A$ is a domain but not a field then $A[x]$ is a domain but not a PID, because $x$ is irreducible but $(x)$ is not maximal. How to show this?
The element $x$ is obviously irreducible in any ring $A[x]$, where $A$ is a domain, because proper factors would have degree $0$.
The ideal $(x)$ has the property that $$ A[x]/(x)\cong A $$ so $(x)$ is maximal if and only if $A$ is a field.
In a PID, an irreducible element generates a maximal ideal.