In atomic-orbital-based coupled-perturbed self-consistent field (AO-based CPSCF) theory, one has to solve the equation $FP^1S-SP^1F=S^1PF-FPS^1+SPF^1-F^1PS$ for $P^1$. $F^1$ on the right-hand-side depends on $P^1$, so this equation must be solved iteratively: step one forming the right-hand-side from a guessed $P^1$, step two solving the equation assuming the right-hand-side is a constant and then going back to step one until convergence.
My confusion is about step two. In step two, one solves an equation $AXB-BXA=C$ for $X$. I wonder how to do it and have failed finding anything about it. The closest topic to it I can find is the Sylvester equation $AX+XB=C$, but I wonder if it is relevant.
Knowledge about CPSCF equation: All matrices are square real symmetric; $S$ is positive-definite; $\mathrm{Tr}P^1=0$.
The question is actually about computational chemistry. I cannot put the tag "computational chemistry" here because I don't have enough reputations to create a new tag.