Typically, when you learn Calculus, almost the first thing you learn is that the derivative of \(\displaystyle x^n\) with respect to x is \(\displaystyle nx^{n-1}\). Nor long after you should have learned that the derivative of \(\displaystyle e^x\) is \(\displaystyle e^x\) and the "chain rule". For the first one, the derivative of \(\displaystyle aW- bW^2\), with respect to W, is \(\displaystyle a(1W^0)+ b(2W^1)= a+ 2bW\). For the second, the derivative of \(\displaystyle -exp(-\theta W)\), with respect to W, is \(\displaystyle -exp(-\theta W)\) times the derivative of \(\displaystyle -\theta W\) which is \(\displaystyle -\theta (1W^0)= -\theta\). Putting those together, the derivative of \(\displaystyle -exp(-\theta W)\) is \(\displaystyle \theta exp(-\theta W)\).