The first coefficient is 2 and the last term is 6. They multiply to 2*6 = 12.
Now we must find two factors of 12 that add to 7 (the middle coefficient).
Through trial and error, you should find that:
3*4 = 12
3+4 = 7
So 3 and 4 are the numbers we're after. We'll split the 7m into 3m+4m and use the factor by grouping method as shown in the steps below.
2m^2 + 7m + 6
2m^2 + 3m + 4m + 6
(2m^2 + 3m) + (4m + 6)
m(2m + 3) + 2(2m + 3)
(m + 2)(2m + 3)
(2m + 3)(m + 2)
The order of the factors doesn't matter since something like 2*3 is the same as 3*2.
------------------------------------------------
Verifying the answer:
You can use technology like you did to check the answer, but here's one way to do it without a calculator.
(2m + 3)(m + 2)
n(m + 2) ...... let n = 2m+3
mn + 2n .... distribute
m( n ) + 2( n )
m(2m+3) + 2(2m+3) .... plug in n = 2m+3
m*2m + m*3 + 2*2m + 2*3 .... distribute
2m^2 + 3m + 4m + 6
2m^2 + 7m + 6
We arrive back at the original trinomial, so we have confirmed the answer.