It's something that comes with practice. At first I wasn't able deduct this step. But if you get used to all the quadratics formulas (in both ways, factored and unfactored), you'll see this patterns more easily.
Special products #1-> x²-y² = (x-y)(x+y)
Special product #2 -> x²+2xy+y² = (x+y)² = (x+y)(x+y)
Special product #3 -> x²-2xy+y² = (x-y)² = (x-y)(x-y)
"There's a difference between interest and commitment. When you're interested in doing something, you do it only when circumstance permit. When you're committed to something, you accept no excuses, only results."