Vins is definitely right on the first one. That was a nice problem to solve.
This second one seems a little more complicated.
To me, it seems like you're going to get x^2 or x^3 terms. There very well might be a typo involved. I'm really not sure where to start.