You have chosen an arbitrary element $x \in \ker B$. You should prove that this element also lies in $\ker AB$, to show the inclusion $\ker B \subset \ker AB$. After that you'll also have to show the other inclusion, where you'll have to use the fact that $A$ is invertible.