q2 – 10q + 21 Coefficient of q2 is 1 so we add and subtract square of half of coefficient of q
Therefore,
q2 – 10q + 21 = q2 – 10q + 52 – 52 + 21 (Adding and subtracting 52)
= (q – 5)2 – 22 (By completing the square)
= (q – 5 – 2) (q – 5 + 2)
= (q – 7) (q – 3)