You can subtract the right side and factor the result, or you can factor the left side then see what happens.
... 5x² +22x +8 = 5x +2
... 5x² + 2x +20x +8 = 5x +2 . . . . split the x term so we can factor by grouping
... x(5x +2) +4(5x +2) = (5x +2)
Now we can subtract the right side and finish the factoring.
... x(5x +2) +(4 - 1)(5x +2) = 0
... (x +3)(5x +2) = 0 . . . . . the factorization of your equation
_____
If we start by subtracting the right side, we are looking to factor ...
... 5x² +17x +6 = 0
... 5x² +2x +15x +6 = 0 . . . . . split the x-term to help factoring by grouping
... x(5x +2) +3(5x +2) = 0 . . . factor pairs of terms
... (x +3)(5x +2) = 0 . . . . . . . . combine the results
______ _____
Factoring quadratics with the leading coefficient not equal to 1 is similar to factoring when it is equal to 1. Here, (after subtracting the right side), we are looking for factors of 5·6 = 30 that add to 17, the coefficient of the x-term.
... 30 = 1·30 = 2·15 = 3·10 = 5·6
The sums of these factor pairs are 31, 17, 13, 11. We see that the factor pair (2, 15) is the one we want, as its sum is 17. You will note these are the numbers used to divide the x-term for factoring by grouping. We rewrote 17x as 2x +15x. (There are other ways to use these numbers, but this is perhaps the easiest to see and remember.)