# Complicate the expression for $\frac{p-1}{p}x+\frac{a}{p}x^{1-p}-a^{1/p}$

I am interested in finding a way to go between the RHS and LHS of the following equation $$\frac{p-1}{p}x+\frac{a}{p}x^{1-p}-a^{1/p}=(x-a^{1/p})\left[\frac{p-1}{p}-\frac{1}{p}\left(\sum_{n=1}^{p-1}\left(\frac{a^{1/p}}{x}\right)^n\right)\right]$$ In the book, it is said it is an "easily" derived formula, however, even after I reversed engineeres the RHS (recognizing geometric sum and simplifying as much as possible) I have been unable to find a way from the left to the right side.
I feel like I must be missing something since this manipulation was supposed to be easy but I do not see it. How would I have gone from the LHS to the RHS?