5x = 6x-x
You are correct, but harish21 was showing you a neat little way of factoring besides the "guess and check" method.
Here is harish21's method.
First, multiply the leading coefficient times the constant: 3 times -2 = -6
Next, determine two numbers whose product is -6 and whose sum is the coefficient of the linear term which is +5.
You should easily see that -1 and 6 meet that criteria.
Replace 5x in your original quadratic expression to 6x - 1x.
Group the first two terms and factor out 3x.
Group the last two terms and factor out -1.
It's easy to see the two binomial factors are
It takes a lot longer to explain it than it does to actually do it.