\(3x^2+5x+2\\ \)
First you need to find two numbers that multiply to give 3*2=6
Obviously they need to be of the same sign (positive or negative)
They also need to add to 5. Since 5 is positive both numbers must be positive.
2 and 3 work
2+3=5
2*3=6
so now you need to write 5x as 3x+2x
\(3x^2+5x+2\\ =3x^2+3x+2x+2\\ =3x^2+3x\quad+\quad2x+2\\ \text{Now factor in pairs}\\ =3x(x+1)\quad + \quad 2(x+1)\\ =(3x+2)(x+1) \)
.