<s>[INST] Stuck on this generating functions and partial fraction expansion step I'm having a hard time figuring out the thought process after the partial fractions are determined. The picture is below: 

So they plug in x=0 to find 2x. How do they determine the other expansions? 
 [/INST] The idea is to add the geometric series that come up after partial fractions.
Let $A(x)=a_0+a_1x^1+a_2x^2+\cdots+a_nx^n=\frac{x}{(1-x)(1-2x)}$.
As a formal expression, we have the following expansion for the geometric series $$1+rx+r^2x^2+r^3x^3+\cdots=\frac{1}{1-rx},\quad r\in \mathbb{C}$$ Then
\begin{align}
A(x)=x\left(\frac{2}{1-2x}-\frac{1}{1-x}\right)&=2x(1+2x+2^2x^2+2^3x^3+\cdots)-x(1+x+x^2+x^3+\cdots)\\
&=(2x+2^2x^2+2^3x^3+2^4x^4+\cdots)-(x+x^2+x^3+x^4+\cdots)\\
&=(2-1)x+(2^2-1)x^2+(2^3-1)x^3+(2^4-1)x^4+\cdots+(2^n-1)x^n+\cdots\\
&=0+(2-1)x+(2^2-1)x^2+(2^3-1)x^3+(2^4-1)x^4+\cdots+(2^n-1)x^n+\cdots
\end{align}
Now, we have the equality
$$a_0+a_1x^1+a_2x^2+\cdots+a_nx^n+\cdots=(2^0-1)+(2-1)x+(2^2-1)x^2+\cdots+(2^n-1)x^n+\cdots
$$
Equating the coefficients of $x^n$, we have that $a_n=2^n-1$ for $n\geq 0$.
</s>