Equation of this type should be seen as x2-SX+P=0, where S is the sum of the solutions, while P is their product. We have too find 2 numbers whose sum is S and product is P. In this example, we have S=7 and P=10, for this 2 conditions we have x1=2 and x2=5, as 2+5=7 and 2x5=10. Next, we will divide 7 in 2 and 5, as it follows: (x2-5x)-(2x+10)=0, in order to be more clear you use brackets. Now, we choose the common factor and extract it => x(x-5)-2(x-5)=0 (!pay attention to the signs). It is easily to see another common factor (x-5), therefore we extract once again the common factor => (x-5)(x-2)=0. This is the final result.