For every $n\times n$ matrix $A$, there exists $B$ such that $AB=BA=0$ and $rk(A) + rk(B) = n$
The question is to prove or disprove this.
I think it is true. Take a $n\times n$ matrix $\tilde A$ in Echelon form where $a_1, \cdots a_k$ are linearly independent row vectors $$\tilde A = \begin{bmatrix} -- &a_1 & -- \\ \;&\cdots\\ -- &a_k & -- \\ 0& \cdots & 0 \\ 0& \cdots & 0 \\ \end{bmatrix}$$ We can define $$\tilde B = \begin{bmatrix} 0 &\cdots & 0 &|&\cdots &|\\ 0 &\cdots & 0 & |&\cdots &|\\ 0 &\cdots & 0 & b_1& \cdots& b_{n-k}\\ 0 &\cdots & 0 &|&\cdots &|\\ 0 &\cdots & 0 &|&\cdots &|\\ \end{bmatrix}$$ where column vectors $b_1,\cdots b_{n-k}$ are linearly independent vectors from $$\text{span}\{a_1, \cdots a_k\}^\perp.$$ Now clearly $\tilde A \tilde B = \tilde B \tilde A = 0$.
Now for general $A$, we know row operation and swapping two rows are given by invertible matrices multiplied on the left side, so there exists a invertible matrix $P$ such that $$A = P \tilde A$$ where $\tilde A$ is in Echelon form. Now just define $$B = \tilde B P^{-1}$$ we have $AB = BA = 0$ and $$rk(A)+rk(B) = rk(\tilde A)+rk(\tilde B) = n.$$
Is this correct?