It's not hard to come across the same question again and again. Filling up the details of Robert answer would be of great help for everyone, and me for sure. Let us suppose that $A$ and $B$ have dimention $n \times m$, as suggested by Robert.
Let us define the linear transformation $T:\text{Im}(A) \rightarrow \mathbb{R}^n$ such that $T(x)=Ex$ for all $x\in \text{Im}(A)$. First, note that $\text{Im}(T) \subset \text{Im}(B)$, since $EA=B$. Furthermore, $T$ is injective, since $FEA=A$, which means that $T$ has a left inverse given by $F$. Hence, thanks to Rank–nullity theorem, $T$ is a one-to-one correspondence between $\text{Im}(A)$ and $\text{Im}(B)$.
Define a new bijection $W: \text{Kern}(A^{T}) \rightarrow \text{Kern}(B^T)$, which exists because the dimenstions are the same, once $\text{Kern}(A^{T})$ is the orthogonal complement of the $\text{Im}(A)$ and $\text{dim}(\text{Im}(A))= \text{dim}(\text{Im}(B))$. Note that, since the sum $\mathbb{R}^m=\text{Kern}(A^T) + \text{Im}(A)$ is a direct sum, is possible to define the linear transformation given by $H:\mathbb{R}^n \rightarrow \mathbb{R}^n$ such that $H(u+v)=T(u)+W(v)$, with $u \in \text{Im} (A)$ e $v \in \text{Kern} (A^T)$. We can prove that $H$ is a bijection as a direct sum of bijective linear operators.
Lastly, taking $G$ as the matrix of $H$ in the canonical basis, $G$ is invertible. Now, since $H(u)=T(u)= E u$ for all $u \in \text{Im}(A)$, we have that $G A = E A = B.$