We can take a look at this polynomial and found that the terms (a2b+ab2) & (a2c+ac2) & (bc2+b2c) have ab,ac&bc in common respectively.
Therefore grouping the given polynomial as :
⇒a2b+ab2+a2c+ac2+b2c+bc2+3abc
=ab(a+b)+ac(a+c)+bc(b+c)+3abc
={ab(a+b)+abc}+{ac(a+c)+abc}+{bc(b+c)+abc}
={ab(a+b+c)}+{ac(a+b+c)}+{bc(a+b+c)}
=(ab+bc+ac)(a+b+c)
Hence, the answer is (ab+bc+ac)(a+b+c).