Rewrite $ x^2-y^2 $ as:
$$ \color{blue}{ x^2-y^2 = (x)^2 - (y)^2 } $$Now we can apply the difference of squares formula.
$$ I^2 - II^2 = (I - II)(I + II) $$After putting $ I = x $ and $ II = y $ , we have:
$$ x^2-y^2 = (x)^2 - (y)^2 = ( x-y ) ( x+y ) $$