Does this price elasticity depend on p? I'm studying for a test I have this week and a practice question asks whether or not the price elasticity of demand for the demand function $\ q = Ap^{-x} $, where A and x are positive constants depends on the price p.

I've attempted to use the equation, $ \frac{dQ}{dP}*\frac{P}{Q} $ in order to solve the problem and I am getting the result,

$ \epsilon = \frac{-xA}{p^{x+1}}*\frac{p}{q} = \frac{-xA}{p^{x}q}$

Which would mean that the elasticity does  depend on p, however the answer in my practice exam says that it does not depend on p. Why is that the case/where did I go wrong?
That type of demand is called an Isoelastic demand function, because the elasticity of demand is constant, so it does not depend on prices.

You have not done any mistake. But you just need to move forward one more step. Notice that at the moment your derivative has both p and q in it. Try to get rid of q. This is, try to have $\epsilon=f(p)$, and not $\epsilon=f(p,q)$. This hint should be enough for you to solve the question.