This is a standard property of transposition ($\displaystyle (AB)^T=B^TA^T$). Let $\displaystyle A$ be an $\displaystyle n\times m$ matrix and let $\displaystyle B$ be an $\displaystyle m\times n$ matrix. Now consider their transposes $\displaystyle A^T$ and $\displaystyle B^T$. Row $\displaystyle i$ of $\displaystyle A$ is exactly the same as column $\displaystyle i$ of $\displaystyle A^T$, similarly column $\displaystyle i$ of $\displaystyle B$ is exactly the same as row $\displaystyle i$ of $\displaystyle B^T$. So you should be able to see that
$\displaystyle row_i(A)\cdot column_j(B)=row_j(B^T)\cdot column_i(A^T),$
so it follows that $\displaystyle (AB)^T=B^TA^T$.