I've got a very interesting problem and wondering if my idea for the solution is right and complete. Please, take a look.
Problem
Given two matrices $A$ and $B$ such that $A^2=A$ and $B^2=B$. Prove that $\operatorname{rank}A=\operatorname{rank}B$ if the matrix $I - (A+B)$ is invertible.
Solution
$A^2=A$
$B^2=B$
Let's subtract the second equation from the first one.
$A^2 - B^2 = A - B$
$(A - B)(A+B) = A - B$
$(A - B)(A+B) - (A-B)= 0$
$(A - B)((A+B) - I))= 0$
$(A - B)(I - (A+B))= 0$
Since $(I - (A+B))$ is invertible, let's multiply the above equation by $(I - (A+B))^{-1}$ from the right.
$(A - B)(I - (A+B))(I - (A+B))^{-1}= 0$
$A - B = 0$
Hence, $A = B$ which means that $rankA = rankB$.