starting here, where you put
f(x+h)-f(x) over h= -2(x+h)^2-(x+h)+1-(-2x^2-x+1) all over h
I think you made an error on the next step, first do the exponent (x+h)^2 = x^2 + 2xh + h^2 then put that back into the equation.
f(x+h)-f(x) over h= -2(x^2 + 2xh + h^2) -(x + h) +1 - (-2x^2 - x + 1) all over h
Now distribute to get rid of all the parenthesis, so the first "-2" times everything in that first set of ( ) and for the other ( ) you should notice they have a "-" before it, which just will change the terms inside the ( ) to its opposite.
= -2x^2 - 4xh - 2h^2 - x - h + 1 + 2x^2 + x - 1 all over h. Now combine like terms
= -2h^2 - 4xh - h all over h (notice (-2x^2 + 2x^2 = 0, same with -x + x, 1 -1 )
You should see the 3 terms in the numerator have an h, so cancel out an h in each term, only 1 though, and you can get rid of the h in the denominator then.
= -2h - 4x - 1