As a general rule, we find the inverse function (if it exists) by swapping the independent and dependent variable and re-solving for an expression of the new independent variable in terms of the dependent variable. In other words,
y = f(x) [Original function] Swapping gives us
x' = f(y').
Now re-arrange to get
y' = g(x') and g is our inverse function.
In your example y = x and x = n. Doing the above gives us:
n = Ax^e
(n/A)^(1/e) = x so our inverse function is
x^(-1)(n) = (n/A)^(1/e) just as you predicted.
For the second we use the normal power rule which gives:
= (1/A)^(1/e) * (1/e) * n^(1/e - 1)
Where did you get your w from?