When writing it down line up the like terms, then subtract them.
9x^3 + 2x^2 - 5x + 4
-(5x^3 -7x + 4)
-----------------------------
4x^3 + 2x^2 + 2x
Breaking it down
9x^3 - 5x^3 = 4x^3
2x^2 - ---- = 2x^2
-5x - (-7x) = 2x (subtracting a negative is the same as adding)
4 - 4 = 0
Final answer:
4x^3 + 2x^2 + 2x