Can someone please confirm I am doing this correctly? Thanks!

Y=x^{2}-2x+2 at P(x,y), let Q (x+Δx, y+Δy) be another point on the curve. Differentiate by definition

y+Δy=(x+Δx)^{2}-2(x+Δx)+2

=X^{2}+2x^{2}(Δx)+2x(Δx)^{2}+(Δx)^{2}-2x-2Δx+2

Δy=2x^{2}Δx+2x(Δx)^{2}+(Δx)^{2}-2Δx

Δy/Δx=2x^{2}+2xΔx+(Δx)^{2}-2

dy/dx=lim/Δx->0 [2x^{2}+2xΔx+(Δx)^{2}-2]

dy/dx=2x^{2}-2