f(x) = (x - 2)^2 = x^2 - 4·x + 4
m = (f(x + h) - f(x)) / h
m = ((x + h)^2 - 4·(x + h) + 4 - (x^2 - 4·x + 4)) / h
m = (x^2 + 2·x·h + h^2 - 4·x - 4·h + 4 - x^2 + 4·x - 4) / h
m = (2·x·h + h^2 - 4·x - 4·h + 4 + 4·x - 4) / h
m = (2·x·h + h^2 - 4·h + 4 - 4) / h
m = (2·x·h + h^2 - 4·h) / h
m = 2·x + h - 4
lim (h → 0) 2·x + h - 4 = 2·x - 4 = 2·(x - 2)