According to some textbooks, for a $n \times p$ partitioned matrix $X = \begin{bmatrix} X_1 & X_2 \end{bmatrix}$, where $n > p$, the following holds.
$$ \operatorname{rank}(X) = \operatorname{rank}(X_1) + \operatorname{rank}(X_2) - \dim(\operatorname{col}(X_1) \cap \operatorname{col}(X_2)) $$
where $\operatorname{col} (A)$ denotes the column space of $A$. I want to have the result $\operatorname{rank}(X) = \operatorname{rank} (X_1) + \operatorname{rank} (X_2)$. For this, I need to prove that
$$\dim(\operatorname{col} (X_1) \cap \text{col} (X_2)) = 0$$
but I don't know how to prove this in a specific matrix. How can I prove $\operatorname{col}(X_1) \cap \operatorname{col}(X_2) = \emptyset$? Does $X_1 a \neq X_2 b$ for any nozero $a$ and $b$ prove this?
To be precise, you need to prove that $\operatorname{col}(X_1) \cap \operatorname{col}(X_2) = 0$, not $\emptyset$. And yes, this is implied by $X_1 a \ne X_2 b$ for $a, b \ne 0$, since every nonzero element of $\operatorname{col}(X_1)$ is given by $X_1a $ for some $a \ne 0$ and similarly for $X_2$.
If you are unsure where the rank formula comes from, it's just the formula for the dimension of the sum of two subspaces (see eg Dimension of the sum of two vector subspaces) $$\dim(U + V) = \dim U + \dim V - \dim (U \cap V)$$ applied to $\operatorname{col}(X) = \operatorname{col}(X_1) + \operatorname{col}(X_2)$.