$${ a }^{ 2 } x+ { a }^{ 2 } y-ax-ay- { a }^{ 2 } +a$$
Factor
$a\left(a-1\right)\left(x+y-1\right)$
Solution Steps
Factor out $a$.
$$a\left(ax+ay-x-y-a+1\right)$$
Consider $ax+ay-x-y-a+1$. Do the grouping $ax+ay-x-y-a+1=\left(ax+ay-a\right)+\left(-x-y+1\right)$, and factor out $a$ in the first and $-1$ in the second group.
$$a\left(x+y-1\right)-\left(x+y-1\right)$$
Factor out common term $x+y-1$ by using distributive property.