Hi everyone!

So I have this equation in my economics book:

1) $\displaystyle \alpha A K^{\alpha-1} N^{1-\alpha} = r $

and they simply rearrange the terms to get to this equation:

2) $\displaystyle K = ( \frac{\alpha A}{r} ) ^{\frac{1}{1-\alpha}} N$

I don't understand how they get from 1) to 2). I managed to get up to this point, but then I don't know what to do next:

3) $\displaystyle K^{\alpha - 1} = \frac{r}{\alpha A N ^ {1 - \alpha }} $

Any help would be greatly appreciated!