How to solve matrix equation $AX + B = XC$, where $X$ is the unknown matrix $3 \times 3$? I can't find any way of getting $X$ out of there. Both $X's$ are on opposite sides. There are no two matrices which are the same so you can't factor anything out.
The matrices are by the way: $A =\begin{bmatrix}0&1&0\\1&1&1\\0&1&0\end{bmatrix},$ $B =\begin{bmatrix}-8&4&-8\\8&-4&8\\-8&4&-8\end{bmatrix},$ $C =\begin{bmatrix}2&2&1\\1&3&2\\0&1&2\end{bmatrix}.$
My post will probably not help the OP. My idea is to show what the tensor product is for.
We put $Y=1/4X$; then the equation is
$AY-YC=-1/4B$, that is, $(*)$ $(A\otimes I-I\otimes C^T)Y=-1/4B$, if we stack the matrices, row by row, into vectors; cf.
https://en.wikipedia.org/wiki/Kronecker_product
$spectrum(A)=\{-1,0,2\}$ and $\chi_C=x^3-7x^2+12x-5$; then
$(\lambda_i)=spectrum(A)\cap (\mu_i)=spectrum(C)=\emptyset$.
Since $spectrum(A\otimes I-I\otimes C^T)=\{\lambda_i-\mu_j;i,j\}$, $(*)$ admits a unique solution.
Note that i) $Av=-v$ where $v=[1,-1,1]^T$.
ii)$-1/4B=v\otimes [2,-1,2]^T=v\otimes (v+u)^T$, where $u=[1,0,1]^T$.
iii) $Cv=u$.
We seek the solution in decomposable form: $Y=k\otimes l^T$. $(*)$ becomes $Ak\otimes l^T-k\otimes (Cl)^T=v\otimes (v+u)^T$.
That works for $k=-v, l=v$; then $Y=-v\otimes v^T=\begin{pmatrix}-1&1&-1\\1&-1&1\\-1&1&-1\end{pmatrix}$, that is, the Hanno's result.
-Time of thinking (1 hour); I would have done a third of the test-