Given appropriately-sized matrices $A, B$, the Sylvester mapping is defined by
$$ S_{A,B}: X \mapsto XA - BX, \quad X \in \mathbf{R}^{m \times n} $$
Under certain conditions, this map has an inverse $S_{A,B}^{-1}$; for example, if $A$ and $B$ are diagonal matrices $A = \mathsf{diag}(\alpha_1,\dots,\alpha_n)$ and $B = \mathsf{diag}(\beta_1,\dots,\beta_m)$ and their spectra are disjoint, the inverse map can be verified to be
$$ S_{A,B}^{-1}: Y \mapsto \sum_{i=1}^m \sum_{j=1}^n \frac{1}{\alpha_j - \beta_i} e_i e_j^{\mathsf{T}} \circ Y, $$ where $\circ$ denotes Hadamard product. Clearly, $S_{A,B}(S_{A,B}^{-1}(Y)) = Y$ here.
Question: Is there a similar "nice" analytical expression for the inverse of the generalized Sylvester mapping $T_{A,B}$, defined below? $$ T_{A,B}: (X, Y) \mapsto \begin{pmatrix} X A - B Y \\ Y A - B X \end{pmatrix} $$ As above, we may assume that $A$ and $B$ are diagonal matrices with disjoint spectra.
The generalized Sylvester mapping appears in the study of singular subspace perturbations (see, e.g., here), but all I have been able to find in the literature so far is about bounding $\| T_{A,B}^{-1} \|$. Any ideas or pointers to references are welcome!