When g(x) is divided by x^2-x-6 , the remainder is x+5.
What is the value of g(3)?
You can write g(x) = p(x)*(x^2-x-6) + x+5 where p(x) is some other polynomial.
When x = 3 x^2-x-6 = 0, so all that is left of g(3) is 3 + 5. i.e. g(3) = 8