Here are the factorisations by grouping in pairs:
1. ax+ay+3bx+3by
Step 1: Group the terms.
(ax+ay)+(3bx+3by)
Step 2: Factor out the common factor from each group.
a(x+y)+3b(x+y)
Step 3: Factor out the common binomial (x+y).
(a+3b)(x+y)
2. 7a+14b+ax+2bx
Step 1: Group the terms.
(7a+14b)+(ax+2bx)
Step 2: Factor out the common factor from each group.