factor

a - 10a + 21

I think that you didn't write the question well , because it would me much more logically that your homework goes like this a^2 - 10a + 21

then this is :
a^2 - 7a-3a + 21
a (a-7) – 3 (a-7)
(a-3)(a-7)

a - 10a + 21 - like this is : -9a + 21 = -3(3a-7)