in this book (https://www.math.upenn.edu/~wilf/DownldGF.html) I think I get the first example until the point:
$$\frac{G(x)} x = 2G(x) + \frac 1 {1-x}$$
How is this equal to
$$G(x) = \frac x {(1-x)(1-2x)} \text{ ?}$$
$$G(x) = \frac x {(1 - x)^2}$$ right?
Sorry for not posting the whole problem and not formatting the equations properly. I need to get used to write math equations with a keyboard and find a tool to do it easily.
We start with $$\frac{A(x)}{x} = 2A(x) + \frac{1}{1-x}.$$ Subtracting $2A(x)$ from both sides and factoring the LHS gives \begin{equation}A(x)\left(\frac{1}{x}-2\right) = \frac{1}{1-x}.\tag{$\ast$}\end{equation} Noting that $$\frac{1}{x}-2 = \frac{1-2x}{x},$$ dividing both sides of $(\ast)$ by $\frac1{x}-2$ yields $$A(x) = \frac{x}{(1-x)(1-2x)}.$$