Finding matrix BA given AB 
Given a matrix $$AB = \begin{bmatrix}-2&-14&14\\5&15&-10\\4&8&-3\end{bmatrix},$$ where $A$ is a $3\times 2$ matrix, and $B$ a $2\times 3$ matrix, how do I find the matrix $BA$?

I was told to find the basis for the rowspace of $AB$, and that $(AB)^2 = 5AB$. However, I do not see how these 2 informations can help me find $BA$ at all.
Any help would be appreciated.
 A: I will use isomorphisms of matrix algebras with corresponding linear operator spaces a lot. Thus, $A\colon\Bbb R^2\to\Bbb R^3$ and $B\colon\Bbb R^3\to \Bbb R^2$.
If you find basis for rowspace of $AB$ you will find that $r(AB) = 2$, where $r$ denotes rank. That also means that $n(AB) = 1$, by rank-nullity theorem (where $n$ is dimension of nullspace of $AB$). 
Obviously, $n(B)\leq n(AB)$ because $\ker B\subseteq \ker (AB)$, hence, by rank-nullity theorem we get that $n(B) = 1$, $r(B) = 2$ ($r(B)$ is at most $2$, so $n(B)$ is at least $1$). Thus, $B$ is epimorphism. 
Similarly, $r(AB)\leq r(A)$, since $\operatorname{im} (AB)\subseteq \operatorname{im} A$. But, $r(A)$ is at most $2$ by rank-nullity theorem and thus $r(A) = 2$. We conclude that $A$ is monomorphism.
Finally, $$5AB = (AB)^2\implies A(BA-5I)B = 0 \implies BA = 5I$$ since $A$ is monomorphism and $B$ epimorphism.
A: We have that $\mbox{rank}(AB)=2$ and 
$$5AB=(AB)^2 \Rightarrow 0=(AB)^2-5(AB)=A(BA-5I_2)B.$$
Now show that $BA=5I_2$ (but be careful because $A$ and $B$ are not square matrices).
