The given expression contains three terms and the first and third terms are perfect squares. That is x2 and 25 (52). Also the middle term contains the positive sign. This suggests that it can be written in the form of a2+2ab+b2, so x2+10x+25=(x)2+2(x)(5)+(5)2
We can compare it with a2+2ab+b2 which in turn is equal to the LHS of the identity ie. (a+b)2. Here a = x and b = 5
We have x2+10x+25=(x+5)2=(x+5)(x+5)