How to factor a difference of squares
An expression that is one perfect square subtracted from another always factors into two binomials that are identical except for the operation between their terms, because the middle terms cancel when the brackets are multiplied together.
A worked example
Factor 9x² − 49. Both terms are perfect squares: 9x² is (3x)² and 49 is 7², and they are subtracted. So 9x² − 49 = (3x + 7)(3x − 7). Check: 9x² − 21x + 21x − 49 = 9x² − 49, because the middle terms cancel.
The mistake people actually make
A sum of two squares, such as x² + 49, can't be factored using real numbers, so the pattern applies only when the second perfect square is being subtracted rather than added.