P(x) = x^2 + 5x + 25 = d(x)Q(x) = x^3 - 125 + 0. R(x) = 0
this is a standard difference of two cubes, such as a^3 - b^3 = a^3 -3a^2b + 3ab^2 - b
where a=x and b = 5. a^3-b^3 = (a-b)(a^3-2ab+b^2)
try long division or synthetic division. when you get the same answer 2 different ways, you're nearly certain you got the right answer. as it's unlikely you could make similar mistakes 2 different ways. Or just factor, twice.