Think Sir Paul McCartney. (SPM) The S symbolises the square in the first section, the P means think of two numbers which plus to make 7 and the M means think of two numbers which multiply to make 10. If you have a pair of numbers which both plus to make 7 and multiply to make 10 (in this case 5 and 2), you know that these two numbers must be put into the brackets.
(x+5)(x+2)