A. Long division
Multiply x-4 by x^2 to get x^3-4x^2. Subtract product
(x^3-7x-6) - (x^3-4x^2) = 4x^2-7x-6
Now multiply x-4 by 4x to get 4x^2-16x. Subtract product
(4x^2-7x-6) - (4x^2-16x) = 9x-6
Now multiply x-4 by 9 to get 9x-36. Subtract product
(9x-6) - (9x-36) = 30
Remainder = (x^3-7x-6)/(x-4) = 30
B. using the Polynomial Remainder Theorem
which says that if a polynomial f(y) is divided by a linear expression (x-a), the remainder equals f(a).
Here f(x)=x^3-7x-6, and (x-a)=(x-4)), i.e. a=4
according to the Polynomial Remainder Theorem,
Remainder = f(4) = (4)^3-7(4)-6 = 64-28-6 = 30 (as before)