1. Simplify brackets
x^2-6x+5=m+x-3-6
2. Simplify m+x-3-6 to m+x-9
x^2-6x+5=m+x-9
3. Subtract x from both sides
x^2-6x+5-x=m-9
4. Simplify x^2-6x+5-x to x^2-7x+5
x^2-7x+5=m-9
5. Add 9 on both sides
x^2-7x+5+9=m
6. Simplify x^2-7x+5+9 to x^2-7x+14
x^2-7x+14=m
7. Switch sides
m=x^2-7x+14
You can always check by putting the new value of m into the equation (I already did that, so you don´t have to)
1.2. Simplify brackets
x^2-6x+5=x^2-7x+14+3-3-6
2.2. Cancel x^2 on both sides
-6x+5=-7x+14-x-3-6
3.2. Simplify -7x+14+x-3-6 to -6x+14-3-6
-6x+5=-6x+14-3-6
4.2. Simplify -6x+14-3-6 to -6x+5
-6x+5=-6x+5
5.2 Since both sides are equal, the value for m is x^2-7x+14
Have a nice day :D