Problem of rank, trace, determinant and eigenvalue Here is a problem and its solution that I translated from Korean (so it might contain some errors):

Problem:
For real n-by-n matrices $A,B$, suppose $xA+yB=I$ for non-zero real $x,y$ and $AB=0$.
  Prove $$det(A+B) = \frac{1}{x^{\text{rank}(A)}y^{\text{rank}(B)}}.$$
Solution:
Let $A'=xA$ and $B'=yB$.
Then $A'+B'=I$ and $A'B'=0$.
Then it follows that $A'=A'^2$ and $B'=B'^2$.
So the minimal polynomials of $A'$ and $B'$ divides $x^2-x$.
  Thus the eigenvalues are $0$ or $1$. Therefore $A'$ and $B'$ are diagonalizable.
  Let $V,W$ be the eigenspace of $A'$, $B'$ respectively corresponding to the eigenvalue $1$.
  Then $\text{trace}(A')=\text{dim}(V)$ and $\text{trace}(B')=\text{dim}(W)$.
(*) Also $\text{trace}(A')+\text{trace}(B')=n$.
  Thus $\text{dim}(V \cap W)=0$ and $R^n=V \oplus W$ (direct sum).
(**) Thus 
  $$\text{det}(A+B)= \frac{1}{x}^{\text{dim}(V)} \frac{1}{y}^{\text{dim}(W)}=\frac{1}{x}^{\text{trace}(A')} \frac{1}{y}^{\text{trace}(B')}=\frac{1}{x^{\text{rank}(A)}y^{\text{rank}(B)}}$$

My question:
1) Why (*) holds?
2) Why (**) holds?
I know that the sum of eigenvalues equals $\text{trace}(A)$ and the multiple equals $\text{det}(A)$. Thank you.
 A: First, we should show that $(A')^2 = A'$.  First, note that $A'$ commutes with $B'$, since $B = I - A'$ is a "polynomial" on $A$. Now,
$$
I = (A' + B')^2 = (A')^2 + (B')^2 + 2A'B'= (A')^2 + (B')^2\\
= (A')^2 + (I - A')^2 = 2(A')^2 - 2A' + I
$$
Rearrange $I = 2(A')^2 - 2A' + I$ to find $(A')^2 = A'$. Similarly for $B'$.
To prove (*): note that
$$
n = \operatorname{Tr}(I) = \operatorname{Tr}(A' + B') = \operatorname{Tr}A' + \operatorname{Tr}B'
$$
To see that $V \cap W = \{0\}$, note that any $v \in V \cap W$ would satisfy $A'B'v = v$.
To prove (**): it suffices to consider $A'$ to $B'$ with respect to a basis that diagonalizes both.
A: They are good tricks.
As for (*) 
Because $A`+B`=I$, $Tr(A`)+Tr(B`)=n$.
And if $dim(V \cap W)\ne 0$, there exists a $X \in V\cap W$. Then $ABX=AX=X$. However, $AB=0$, that's a conflict. 
So $dim(V \cap W)= 0$.
As for (**) First we notice that W is the eigenspace of $A`$ corresponding to the eigenvalue 0, because $A`B`=0$. And the same to V.
Because $R^n=V(+)W$, when we diagonalize $A`$, $B`$ is also diagonal. 
So we can calculate $$det(A+B)=det(\frac{1}{x}A`+\frac{1}{y}B`)$$
A: First, it's not true that the characteristic polynomial of $A'$ (or $B'$) must divide $x^2 - x$. What is true is that the minimal polynomial of $A'$ (or $B'$) must divide $x^2 - x$ and hence $A'$ (and $B'$) is diagonalizable with possible eigenvalues $0,1$.
Since $A' + B' = I$, we get 
$$ \operatorname{trace}(A' + B') = \operatorname{trace}(A') + \operatorname{trace}(B') = \dim V + \dim W = \operatorname{trace}(I_n) = n. $$
Since $A'B' = 0$, if $v \in V \cap W$ then $0 = A' B'v = A'v = v$ which shows that $V \cap W = \{ 0 \}$. This, together with $\dim V + \dim W = n$ implies that $\mathbb{R}^n = V \oplus W$. Finally, the eigenvalues of $cB' + dI$ are $d$ with multiplicity $\dim V$ and $c + d$ with multiplicity $\dim W$. Hence,
$$ \det(A + B) = \det \left( \frac{1}{x} \left( xA + yB + (x - y)B \right) \right) = \det \left( \frac{1}{x} I +  \frac{x-y}{y}B' \right) \\ = \frac{1}{x}^{\dim V} \left( \frac{1}{x} + \frac{x - y}{y} \right)^{\dim W} = \frac{1}{x}^{\dim V} \frac{1}{y}^{\dim W}.$$
