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]$
What you have is not yet enough to show that $\mathbb{Z}[x]$ is not a PID. We would have to show that there is no polynomial $d$ such that $(f,g)=(d)$. You only claim that $d=2x+1$ is not in $(f,g)$. But note that we have $d=gcd(f,g)=af+bg\in (f,g)$ for some polynomials $a,b$. The answers of your link have already shown you how to do this kind of proof (with the ideal $(2,x)$, which is not principal).