So if I understand correctly, when there is e^-kx with or without a constant at the front the chain rule is used. When there is e^-kx with a variable at the front the product rule is used.

Precisely. You use the product rule when you have a product of functions, and the chain rule when you have a composition functions. If there was a variable in front of e^-kx, it would mean we have a product of two functions, so the product rule would be used, but if it's just a constant then we can't use the product rule because we don't have a product of two functions - merely a product of a constant and a (composite) function. You wanted to differentiate \(\displaystyle axe^{-kx}\). You can see it's a product of two functions: \(\displaystyle ax \) and \(\displaystyle e^{-kx}\), so we need to use the product rule. The product rule states \(\displaystyle \dfrac{d}{dx}\left\{f(x)\cdot{g(x)}\right\} = f'(x)g(x)+g'(x)f(x). \) If we now take \(\displaystyle ax \) as \(\displaystyle f(x) \) and \(\displaystyle e^{-kx}\) as \(\displaystyle g(x)\), we need to find both \(\displaystyle f'(x)\) and \(\displaystyle g'(x)\). It's easy to find \(\displaystyle f'(x)\) because \(\displaystyle \dfrac{d}{dx}\left(ax\right)= a\), but what about \(\displaystyle g'(x)\)? Well, \(\displaystyle g'(x)\) is the derivative of \(\displaystyle e^{-kx}\), but that's not a product so we cannot use the product rule. It's a composition of two functions, so we have to then use the chain rule, which states \(\displaystyle (f \circ g)'(x) = f'(g(x))g'(x)\). We have \(\displaystyle f'(g(x)) = \dfrac{d}{dx}\left(e^{-kx}\right) = e^{-kx}[/Math], and \(\displaystyle g'(x) = \dfrac{d}{dx}\left(-kx\right) = -k\)\)\(\displaystyle , which means \(\displaystyle f'(g(x))g'(x) = -ke^{-kx}\), then we have found \(\displaystyle g'(x)\). Therefore \(\displaystyle \dfrac{d}{dx}\left\{axe^{-kx}\right\} = ae^{-kx}-ke^{-kx}ax\), which you can of course simply to Soroban's answer. Basically, whenever you have functions of the form \(\displaystyle (f\circ g)(x)\), you use the chain rule, and whenever you have a function of the form \(\displaystyle f(x)\cdot{g(x)}\), you use the product rule.\)