a: \(=\left(a-b\right)\left(a-b+a-3b\right)=\left(a-b\right)\left(2a-4b\right)\)
\(=2\left(a-b\right)\left(a-2b\right)\)
b: \(=\left(x+1\right)\left(y-2y+1\right)=\left(x+1\right)\left(1-y\right)\)
g) (a - b)2 - (b - a)(a - 3b)
= (b - a)2 - (b - a)(a - 3b)
= (b - a)(b - a - a + 3b)
= (b - a)(4b - 2a)
= 2(b - a)(2b - a)
i) y(x + 1) - (1 + x)(2y - 1)
= (x + 1)(y - 2y + 1)
= (x + 1)(1 - y)