Furthermath differentiate (x-3)(x^2+5)with respect to x

using the product rule, you get

(1)(x^2+5) + (x-3)(2x) = 3x^2 - 6x + 5