When you have to take the derivative of 2 variables being multiplied, we use the product rule. If we have f(x)g(x), the derivative will be:
(f(x)g(x))' = f(x)g'(x) + g(x)f'(x).
Now, the primes can be a little confusing when you are learning how to apply this for the first time, so lets denote the number 1 to f(x) and the number 2 to g(x), where 1 refers to f(x) and 2 refers to g(x). The product rule becomes easy to memorize.
Sing it to yourself: 1d2 + 2d1
Whenever you have a "d" in front of the number we denoted for the first part of the function, you take the derivative, and if there is no "d", we simply copy the exact same function.
Example: (x+4)(x² - 1)
Here, your 1 = (x+4) and 2 = (x² - 1).
We compute 1d2 + 2d1 = (x+4)(x² - 1)' + (x² - 1)(x+4)'
Notice that the functions you need to take the derivative are in orange. After you have noted which parts to compute the derivative, the next line becomes:
(x+4)(2x) + (x² - 1)(1) = 2x² + 8x + x² - 1 = 3x² + 8x - 1
That is our final answer.