Answer
See below.
Work Step by Step
If $A$ is an $a\times b$ and $B$ is a $c\times d$ matrix, then $AB$ is defined if $b=c$ and $BA$ is defined if $d=a$.
Hence, if $A$ is an $a\times b$ matrix, $B$ must be a $b\times a $ matrix if $AB$ and $BA$ are defined.