In recent days, I learned a linear algebra problem from one of my friends. It can be stated as follows.

Given four matrices $A,B,C,D$, find three matrices $E,G,F$, not simultaneously zero, such that the following conditions (1), (2), (3) are satisfied: $$ \begin{align*} (1) &\quad AE=EA, \cr (2) &\quad BG=GB, \cr (3) &\quad AF-FB=ED-CG. \end{align*} $$ The question is whether such $E,G,F$ always exist.

Also it is obvious that we can obtain $E,G$ by (1) and (2) easily. However the hard die is to satisfy condition (3). I just know when $A$ and $B$ have different spectra, we can obtain $F$ in a unique way.