Treat t as constant, so
d/dx [3cos(x^2) - 4e^t]
= 3 d/dx cos(x^2) - 4 d/dx e^t
= -6x sin(x^2) - 4e^t x
Correct. But then...
... the e^t is constant, so it might as well come out with the 4:, so
d/dx [3cos(x^2) - 4e^t]
= 3 d/dx cos(x^2) - 4 d/dx e^t
= 3 d/dx cos(x^2) - 4e^t d/dx 1
... but then the whole second term is a constant term and drops out...
= -6x sin(x^2)
... period.
As long as t isn't a function of x, or anything... the context of the problem here would help.