I know this is already answered here but I am wondering that if the following way to prove is also correct - let
$$f(x) = 4x^2+4x+1$$
$$g(x)=4x^2-1$$ Since this is a UFD so a unique gcd will exist. gcd is $$d(x)=(2x+1)$$
Now to prove this is a principal ideal domain I have to show that a general element of form $rf+sg$ can be generated with some element $d\in \mathbb{Z}[x]$
i.e. there is some ideal $(d) = (f,g)$
So my point is that there isn't any actually d for which this will form the same ideal as $(f,g)$ even if $d$ is gcd of $f$ and $g$
i.e. $$(2x+1)\not= r(4x^2+4x+1) + s(4x^2-1)$$ for any r, x $\in \mathbb{Z}[x]$ although this can happen for $\mathbb{Q}[x]$