Factor the expression by grouping. First, the expression needs to be rewritten as $a^{2}+pa+qa+6$. To find $p$ and $q$, set up a system to be solved.
$$p+q=5$$ $$pq=1\times 6=6$$
Since $pq$ is positive, $p$ and $q$ have the same sign. Since $p+q$ is positive, $p$ and $q$ are both positive. List all such integer pairs that give product $6$.
$$1,6$$ $$2,3$$
Calculate the sum for each pair.
$$1+6=7$$ $$2+3=5$$
The solution is the pair that gives sum $5$.
$$p=2$$ $$q=3$$
Rewrite $a^{2}+5a+6$ as $\left(a^{2}+2a\right)+\left(3a+6\right)$.
$$\left(a^{2}+2a\right)+\left(3a+6\right)$$
Factor out $a$ in the first and $3$ in the second group.
$$a\left(a+2\right)+3\left(a+2\right)$$
Factor out common term $a+2$ by using distributive property.