Prove $\operatorname{rank}(AB) = \operatorname{rank}(B)$

The proof is incomplete. You've essentially justified $\text{Null}(AB) \subseteq \text{Null}(B)$, but you haven't proven the reverse containment $\text{Null}(B) \subseteq \text{Null}(AB)$. If $Bx = 0$, then $ABx = A0 = 0$. Hence $x \in \text{Null}(B)$ $\implies$ $x \in \text{Null}(AB)$. Thus $\text{Null}(B) \subseteq \text{Null}(AB)$, and given that you justified $\text{Null}(AB) \subseteq \text{Null}(B)$, consequently we have $\text{Null}(AB) = \text{Null}(B)$. So $\text{dim}\, \text{Null}(AB) = \text{dim}\, \text{Null}(B)$, i.e., $\text{rank}(AB) = \text{rank}(B)$.