Find the constant p such that x2−5x−2x+10x+p is the square of a binomial.
x^2 + 8x + p
p = (1/2 the coefficient on x )^2 = (8/2)^2 = 4^2 = 16
So
x^2 + 8x + 16 =
(x + 4) ( x + 4) =
(x + 4)^2