How do you factor by grouping ab + 7a + 2b + 14?

$a b + 7 a + 2 b + 14 = \left(a b + 7 a\right) + \left(2 b + 14\right)$
$= a \cdot \left(b + 7\right) + 2 \cdot \left(b + 7\right)$
$= \left(a + 2\right) \left(b + 7\right)$