So if , let p = rt and k = st, where r and s are co-prime.

Then , hence .

Since t has to divide the left-hand side of the last equation, and t is clearly co-prime with rt+1, it follows that t divides r (so that t^2 divides p: you already knew that).

Similarly, since r has to divide the right-hand side of that equation, and r is co-prime with both s and r+s, it follows that r divides t.

Put those two facts together, and you have r=t as required.