First you must simply distribute where needed, we will start with distributing the 4x^2 to (2x+7) and using FOIL (First Outer Inner Last) for (x+3)(x-8)
5x+8x^3+28x^2-6x^2-9x+x^2-8x+3x-24
Next group like terms ( the x's with the x's, the x^2 with the x^2, and so on)
8x^3+23x^2-9x-24 is your answer