If we want to factor the following expression
ab + 2b- a + 2
First, put together similar terms and find the factor in common:
(ab -a) + (-2b + 2)
that is equivalent to
a(b-1) + -2(b-1)
note that the factor in common is (b-1). so we have:
(b-1)(a-2)
so the final answer is:
(b-1)(a-2)