How do I do this problem?

(x^2 + x -1)(2x^2 - x + 2)

The answer is
2x^4 + x^3 - x^2 + 3x - 2
I just don't know how to get to it.

you multiply term by term...

(x^2 )(2x^2 - x + 2)+x(2x^2 - x + 2)-(2x^2 - x + 2)
then gather like terms.