This is the <A HREF="https://en.wikipedia.org/wiki/Sylvester_equation">Sylvester equation.</A> A simple explicit solution is possible under certain conditions (no common eigenvalues of the matrices $C^{-1}A$ and $-DB^{-1}$), as explained in the Wikipedia page. There are more complicated general methods, see

 1. <A HREF="https://link.springer.com/article/10.1007/BF02843670">Explicit
    solutions of the matrix equation $AX−XB=C$</A> (1974)
 2. <A HREF="https://link.springer.com/article/10.1007/BF02466983">The explicit solution of the matrix equation $AX−XB=C$</A> (1995)
 3. <A HREF="http://en.cnki.com.cn/Article_en/CJFDTotal-JAXG198909000.htm">Continued-fraction solution of matrix equation $AX-XB=C$</A>(1989)