Answer :
[tex]x-d+(x-d)^2= (x-d)[1+(x-d)]= \\ \\ =\boxed{(x-d)(1+x-d)}[/tex]
[tex]x-d+(x-d)^2=\ \ \ |Put\ x-d\ \ in\ front\ of\ the\ bracket\\\\
(x-d)(1+(x-d))=(x-d)(1+x-d)\\\\Solution\ is\ (x-d)(1+x-d).[/tex]