Factorising and dividing a2+7a+10 by (a+5) gives:
1
a+1
2
a+2
a2+7a+10=a2+5a+2a+10=a(a+5)+2(a+5)=(a+2)(a+5)Dividing this by (a+5) gives (a+2).