There are various methods to do this, but starting off you should learn to equate co-efficients.
It goes something like this:
If, ax^2+bx+c=Ax^2+Bx+C
then a=A, b=B, c=C
So what you need to do is expand the RHS of the equation, collect all co-efficients for each variable, x^2, x and the...