Perhaps, you mean 6ab² (If not please remind me.)
Factoring the polynomials can be done by pulling out the terms that can be divided by that terms.
For example,
We can divide the whole polynomial by 2. Thus, we factor 2 out of the polynomial as we get
-- Factoring is like dividing, but instead - we pull them out.
Now let's get back to the question.
Notice that the polynomial can be divided by 2, a and b.
So we pull 2, a and b out of the polynomial and divide them.
When dividing, we should get a + 3b.
Then we pull out 2ab outside the bracket.
Thus, the answer is 2ab(a+3b)