The quick answer is that d/dx a^x = ln(a) * a^x. But why?
Well, let's go through the steps so we can understand why the formula works.
Firstly, a^x can be written as (e^(ln(a)))^x because e^(ln(z)) = z as the natural log (ln) is the inverse of e to the power. Then we can write it as e^(x * ln a) because (a^b)^c = a^(b*c). Then differentiating e^(x * ln a) = ln(a) * a^x!