I think the answer would be (a-1)(y-1).
Explanation:
Factor out the greatest common factor from each group.
Group the first two terms and the last two terms.
(ay-y)-a+1
Factor out the greatest common factor (GCF) from each group.
y(a-1)-(a-1)
Factor the polynomial by factoring out the greatest common factor, a-1.
(a-1)(y-1)