## Need help understanding Generating Functions problem

First of all, i'm not sure if this topic belongs in this board. In either case...

I'm having a hard time following a particular generating function problem. I understand generating functions and I have the entire problem worked out infront of me, I am just clueless as to how they go from one step to the next.

An easy example problem is:
Find the general formula for an = F(n) using generating functions:
a_n+2 = 5a_n+1 ¡ 4a_n, a_0 = 1, a_1 = 2;

f(x) = the sum of a_nx^n from 0 to infinity.
The first step is
$f(x) (1-5x+4x^2) = a_o + (a_1-5a_0)x = 1-3x$

How is this step achieved? How are these two equal?

Thank you.