Given matrices $A, B \in \mathbb R^{n \times n}$ whose ranks satisfy the inequality $$r(A)+r(B) < n$$ show that there exists a vector $x \in \mathbb R^n \setminus \{0_n\}$ such that $A x = B x = 0_n$.
Since $r(A) + r (B) < n$ , hence $A, B$ both are singular matrices. Hence $Ax=0 $ and $Bx=0$ both have nonzero solutions. Now how to prove that intersection of the null space of $A$ and null space of $B$ is nontrivial.
Note that the dimension of the kernel of $A$ is $n - r(A)$, and a similar result holds for $B$. So there are $n - r(A)$ linearly independent vectors that form a basis of the kernel of $A$, and $n - r(B)$ linearly independent vectors that form a basis of the kernel of $B$. Note that $n - r(A) + n - r(B) > n$, so the two basis sets are not linearly independent, i.e. there exists a nonzero vector expressible in both bases. This vector is now our required $X$.