If y = aˣ, then y = exp(ln(aˣ)) = exp(x ln(a)). (Here I use exp(x) = eˣ.)
Then using the chain rule, the derivative of y is
dy/dx = exp(x ln(a)) • ln(a)
and undoing the rewriting, we end up with
dy/dx = ln(a) aˣ