Here's the long division:
3x^2 + (-10x) + 40
___________________________
x+3/3x^3 + (-x^2) + 10x + (-4)
3x^3 + 9x^2
------------
-10x^2 + 10x
-10x^2 + -30x
-------------
40x + (-4)
40x + 120
----------
-124
As usual, when the remainder is not 0, you put it into the numerator of a fraction with the divisor in the denominator. So:
(3x^3 – x^2 + 10^x – 4) ÷ (x + 3) =