Error in the book? Or wrong logic?
The problem should be to prove $I-A$ is invertible. If $A^k=0$, the determinant of $A^k$ is zero, so the determinant of $A$ is also zero, so $A$ is not invertible. Then the equation to be proved should remind you of the sum of a geometric series. Just multiply $(I-A)(I+A+A^2+\ldots A^{K-1})$ and most of the terms cancel.
If $A^k=O$ then $A^{-1}$ does not exist. I believe the author intended to say $I-A$ is invertible.
$A$ is not necessarily invertible. Consider $$A=\begin{bmatrix} 0 & 1 \\ 0 & 0 \\ \end{bmatrix}$$
Then $A^2=0$ but $A$ is not invertible. The statement has to be $I-A$ is invertible.