there exists $E$ and $F$ square matrices such that $EA=B$ and $FB=A$, then there exists invertible matrix $G$ such that $GA=B$?
I'm needing a way too detailed proof or a simple counter-example, 'cos I'm feeling so upset for not being able to prove this after a long try and I feel like this can't be done right without a detailed proof.
Let $V = \text{Ran}(A)$, the range (column space) of $A$, and $W = \text{Ran}(B)$. Thus $E$ maps $V$ onto $W$ and $F$ maps $W$ onto $V$, and $E F$ is the identity map on $W$. Let $G = E$ on $V$, and let it map the orthogonal complement of $V$ to the orthogonal complement of $W$.
EDIT: To address your comment, the matrix is the matrix of a linear transformation. To be more explicit, take a basis $v_i$ of $\mathbb R^n$ (if $A$ and $B$ are $n \times m$ matrices) such that the first $k = \text{rank}(A)$ elements are in $V$, and another basis $w_i$ of $\mathbb R^n$ whose first $k$ elements are in $W$. We want $G v_i = E v_i$ for $i \le k$ and $G v_i = w_i$ for $i > k$.