HELP WITH FACTORING BY GROUPING PLEASE



(A^2+2AB+B^2) - 4;;

X^2 + 2X +1 -Y^2;;

9 - (X^2 + 4XY + 4Y^20);;

How to solve them, and is there one pattern to solve them, or what do
they have in common to solve them.

.