First, expand (x−5)2: (x−5)2=(x−5)(x−5)=x2−5x−5x+25=x2−10x+25 Next, expand (x+2)(x−2). This is a difference of squares: (x+2)(x−2)=x2−22=x2−4 Now, subtract the second expression from the first:
(x−5)2−(x+2)(x−2)=(x2−10x+25)−(x2−4) =x2−10x+25−x2+4 =(x2−x2)−10x+(25+4) =0−10x+29 =−10x+29