5. (12 points) Consider the $p \times p$ matrix $X'X$, and $X'$ is the transpose of $X$. Let $x'$ be the $i$th row of $X$. Hence $X'X - xx'$ is the $X'X$ matrix with the $i$th row removed. Assume $(X'X)^{-1}$ exists. Show that

$$(X'X - xx')^{-1} = (X'X)^{-1} + \frac{(X'X)^{-1}xx'(X'X)^{-1}}{1 - x'(X'X)^{-1}x}.$$