What you are trying to do is FACTOR the trinomial.
The slip & slide method works this way (in your problem.
"Slide" the 8 to the right and multiply it by the constant term to get: m2 +6m -40.
Factor this easily as (m+10)(m-4).
Divide the roots by the 8 you started with: (m+10/8)(m-4/8), i.e. (4m+5)(2m+1).
To understand why this works; start with Ax2 + Bx + C = 0
Substitute u=x/A to get: u2/A + Bu/A + C = 0
Multiply by A: u2 + Bu + AC = 0
Now apply the quadratic formula to get the roots.
The get x by dividing u by A.