Factorization
Factoring is expanding in reverse: it bundles a spread-out polynomial back into a product of factors, like turning a mixture back into its ingredients. That is how x²+6x+9 becomes (x+3)². The perfect-square and difference-of-squares identities, and two numbers whose product and sum give the constant and middle term, are the usual tools. Change a, b, and the constant and the pieces build one square.