This is somewhat of a reference request. In several posts on the rank of products of matrices (e.g., Full-rank condition for product of two matrices), it is stated that
$$ \operatorname{rank} (AB) = \operatorname{rank} (B) - \dim \big(\operatorname{N} (A) \cap \operatorname{R} (B)\big) $$
It appears that this is a classic result, though I am not familiar with it. If anyone can point me to a textbook that discusses it and other rank inequalities, that would be much appreciated!