If $A$ is an $m\times n$ matrix and $B$ is a $s\times n$ matrix such that $AB'=0$, show that $$\operatorname{rank}(A'A + B'B) = \operatorname{rank}(A)+\operatorname{rank}(B).$$ I have tried using the result $\operatorname{rank}(P+Q)<\operatorname{rank}(P)+\operatorname{rank}(Q)$(P an Q are both $p\times q$) but it is not working.
$\matrix A'$ is A transpose.