If $AB=0$ prove that $\mathrm{rank}(A)+\mathrm{rank}(B)\leq n$
By $AB=0$, the column space of $B$ lies in the null space of $A$, i.e. $\mathrm{col}(B)\subset N(A)$. This implies that $\mathrm{rank}(B)=\dim (\mathrm{col}(B))\leq \dim N(A)$. Then, by rank-nullity theorem, we have $$\mathrm{rank}(B)+\mathrm{rank}(A)\leq \dim N(A)+\mathrm{rank}(A)=n.$$
Note added: To see $\mathrm{col}(B)\subset N(A)$, suppose that $B=[B_1|\cdots|B_n]$. If $x\in\mathrm{col}(B)$, then $x=y_1B_1+\cdots+y_nB_n=By$, where $y$ is the vector given by $y=\left[ \begin{array}{c} y_1 \\ y_2 \\ \vdots \\ y_n \\ \end{array} \right]$. Therefore, $Ax=ABy=0$ since $AB=0$.