$
f(x) = x^3 \\[3ex]
f(x + h) = (x + h)^3 \\[3ex]
f(x + h) = x^3 + 3x^2h + 3xh^2 + h^3 \\[3ex]
$
Student: That was fast.
How did you get it?
Teacher: I used the Pascal's Triangle.
Student: What is it?
Teacher: Here is the video: Pascal's Triangle and the Binomial Theorem
You can expand binomials raised to any positive exponent quickly using that method.
Would you like for me to do it another way?
Student: Yes, please.
$
(x + h)^3 = (x + h)(x + h)(x + h) \\[3ex]
(x + h)(x + h) = x^2 + hx + hx + h^2 \\[3ex]
(x + h)(x + h) = x^2 + 2hx + h^2 \\[3ex]
(x^2 + 2hx + h^2)(x + h) = x^3 + hx^2 + 2hx^2 + 2h^2x + h^2x + h^3 \\[3ex]
(x + h)^3 = x^3 + 3x^2h + 3hx^2 + 3h^2x + h^3 \\[3ex]
(x + h)^3 = x^3 + 3x^2h + 3xh^2 + h^3 \\[3ex]
DQ = \dfrac{f(x + h) - f(x)}{h} \\[5ex]
DQ = \dfrac{x^3 + 3x^2h + 3xh^2 + h^3 - x^3}{h} \\[5ex]
DQ = \dfrac{3x^2h + 3xh^2 + h^3}{h} \\[5ex]
DQ = \dfrac{h(3x^2 + 3xh + h^2)}{h} \\[5ex]
DQ = 3x^2 + 3xh + h^2
$