Answer: 2x + h - 2
===============================================
Work Shown:
Part 1
[tex]f(x) = x^2 - 2x + 8\\\\f(x+h) = (x+h)^2 - 2(x+h) + 8\\\\f(x+h) = (x+h)(x+h) - 2(x+h) + 8\\\\f(x+h) = x(x+h)+h(x+h) - 2(x+h) + 8\\\\f(x+h) = x^2+xh+xh+h^2 - 2x-2h + 8\\\\f(x+h) = x^2+2xh+h^2 - 2x-2h + 8\\\\[/tex]
Part 2
[tex]\frac{f(x+h)-f(x)}{h} = \frac{(x^2+2xh+h^2 - 2x-2h + 8) - (x^2-2x+8)}{h}\\\\\frac{f(x+h)-f(x)}{h} = \frac{x^2+2xh+h^2 - 2x-2h + 8 - x^2+2x-8}{h}\\\\\frac{f(x+h)-f(x)}{h} = \frac{2xh+h^2-2h}{h}\\\\\frac{f(x+h)-f(x)}{h} = \frac{h(2x+h-2)}{h}\\\\\frac{f(x+h)-f(x)}{h} =2x+h-2\\\\[/tex]
-------------
In part 1, I replaced every x with x+h. Then I expanded things out using the distributive property. This is to figure out what f(x+h) is equal to.
In part 2, I then computed the difference quotient. Notice how basically all of the terms in the original f(x) cancel out. Leaving nothing but h terms behind. We factor out h to cancel it with the denominator.