$\def \R{\mathbb{R}}$$\def \N{\mathbb{N}}$ $\def \rank{\mbox{rank}}$ $\def \range{\mbox{range}}$ Let $m, n \in \N$. Define $M_{m, n}(\R)$ as a set of all $m \times n$ matrices. For $A, B \in M_{m, n}(\R)$ we have the following rank-sum inequality; $$ \rank(A + B) \leq \rank(A) + \rank(B). $$ This follows from the observation that $\range(A+B) \subset \range(A) + \range(B)$. Here $\range(M) := \{ Mv : v \in \R^n \}$ and $\rank(M) := \dim(\range(M))$ for $M \in M_{m, n}(\R)$.
The quesition is about when the equality holds in the above rank-sum inequality. According to Matrix Analysis by Roger A. Horn and Charles R.Johnson, the equality holds if and only if $\range(A) \cap \range(B) = \{0\}$ and $\range(A^{T}) \cap \range(B^{T}) = \{0\}$. Here $A^T$ denotes the transpose of $A$. I understand the "only if" part. Indeed suppse that the equlaity holds. Let $Av_1, \ldots , A v_k$ be a basis of $\range(A)$ and $Bw_1, \ldots, Bw_l$ be a basis of $\range(B)$. Then $k = \rank{A}$, $l = \rank{B}$ and the set $\{Av_1, \ldots, Av_k, Bw_1, \ldots, Bw_l\}$ spans $\range(A+B)$. Since we are assuming that $\rank(A+B) = \rank(A) + \rank(B) = k + l$, the set$\{Av_1, \ldots, Av_k, Bw_1, \ldots, Bw_l\}$ is independent. Therefore $\range(A) \cap \range(B) = \{0 \}$. Noting that $\rank(A) = \rank(A^T)$ and etc, we have $\rank(A^T + B^T) = \rank(A^T) + \rank(B^T)$ and thus $\range(A^T) \cap \range(B^T) = \{0\}$.
However I don't know how to prove the "if" part. I tried to reduce to the case where $A$ is of the form $I_k \bigoplus \large0$ but that was not successful for me. Thank you for your help.