In every source I've read about generating functions if $A(x)$ is a generating function, we treat $x$ as an indeterminate, in particular, it is treated as a placeholder. And if one goes on with what Wikipedia says about an indeterminate variable, https://en.wikipedia.org/wiki/Indeterminate_(variable), one can not treat $x$ as a number, for instance (i might be misunderstanding).
I am having the confusion about why in some cases we can assign a value to $x$. I'll appreciate if someone clarifies my misunderstanding.
Example, in Stanley's Enumerative Combinatorics he makes x=1 when trying to prove that $$n2^{n-1} = \sum_{k\geq0}k\binom{n}{k} $$