I'm going to assume there was a typo and the first polynomial was meant to lead off with #x^3# and not #x^2#. The math shown below would work even if it was meant to be #x^2#, though the answer will be different obviously.

One way to do this division is by using polynomial long division (LD). LD works as it would for normal numbers, though it "looks worse" because of the terms involved. (I'd prefer using synthetic division (SD) myself, as the numbers are a little cleaner to look at, but not everyone is familiar with - or comfortable using - SD for quadratic divisors.)

Write out the problem as though it were a regular division problem:

#color(white)("aaaaaaaaaaa")underline(color(white)("aaaaaaaaaaaaaaaaaaaaaa"))#

#x^2-4x-7|color(white)("a")x^3-10x^2+30x+76#

Begin by looking at only the leading term of the divisor and the dividend, and consider their quotient: #x^3/x^2 = x# Write this #x# over the line above the #x^3# term (shown in green below). Then, write the product of this #x# with the divisor underneath the dividend (shown in blue below), and subtract those and write the result underneath a new line (shown in red below).

#color(white)("aaaaaaaaaaa")underline(color(white)("aaa")color(green)(x)color(white)("aaaaaaaaaaaaaaaaaa"))#

#x^2-4x-7|color(white)("a")x^3-10x^2+30x+76#

#color(white)("aaaaaaaaaaa|")-underline(color(blue)(x^3-)color(white)("a")color(blue)(4x^2-)color(white)("a")color(blue)(7x))#

#color(white)("aaaaaaaaaaaaaaaa")color(red)(-)color(white)("a")color(red)(6x^2+37x)#

*Note:* Beware that you properly subtract all terms in blue from those above them; negative signs cause particular problems in this kind of work.

Next, "bring down" the next unused term from the original dividend (76 in this case) to the red colored line, then repeat the process we just did. In this case, #(-6x^2)/x^2 = -6#:

#color(white)("aaaaaaaaaaa")underline(color(white)("aaa")xcolor(white)("aa")color(green)(-)color(white)("a")color(green)(6)color(white)("aaaaaaaaaaa"))#

#x^2-4x-7|color(white)("a")x^3-10x^2+30x+76#

#color(white)("aaaaaaaaaaa|")-underline(x^3-color(white)("a")4x^2-color(white)("a")7x)#

#color(white)("aaaaaaaaaaaaaaaa")-color(white)("a")6x^2+37xcolor(white)("a")color(purple)(+76)#

#color(white)("aaaaaaaaaaaa")-underline(color(white)("aa")color(blue)(-)color(white)("|")color(blue)(6x^2+24x)color(white)("a")color(blue)(+42))#

#color(white)("aaaaaaaaaaaaaaaaaaaaaaaa|")color(red)(13x+34)#

Since there are no more terms unused from the dividend, we can now write the answer:

#(x^3-10x^2+30x+76)/(x^2-4x-7) = x-6 + (13x+34)/(x^2-4x-7)#