Consider the following optimization problem $$ \min_X \quad XAX^T + XB + B^TX^T \tag{1} $$ where $X \in \mathbb R^{m \times n}, A \succ 0,$ and $B \in \mathbb R^{n \times m}$. To precisely define a solution $X^*$ of $(1)$, let $f(X) = XAX^T + XB + B^TX^T$. We say that $X^*$ solves $(1)$ if for every $Z \in \mathbb R^{m \times m}$ such that either $f(X^*) - Z \preceq 0$ or $f(X^*) - Z \succeq 0$ (i.e. $f(X^*)$ and $Z$ are comparable under the partial order $\preceq$), we have $f(X^*) - Z \preceq 0$, or equivalently $f(X^*) \preceq Z$.
According to a paper that I'm reading, the solution to the problem in $(1)$ is $X^* = -B^TA^{-1}$, which was derived by solving the equation $$ 2B^T + 2XA = 0 \tag{2} $$ for $X$. It seems that $(2)$ is obtained by computing the Jacobian of the objective function in $(1)$ and setting it equal to $0$. However, I'm not sure if this is true, and even if it is, how to compute the Jacobian of the objective function in $(1)$. I would appreciate any hints on how the solution $X^*$ was obtained here.
$A \succ 0$ then we can have its root square $CC^T = A$. Suppose that $A$ is not degenerate then $C$ is inversible.
$$\begin{align} I &:= XAX^T + XB + B^TX^T \\ &= (XC)(XC)^T + XC(C^{-1}B) + (C^{-1}B)^T(XC)^T\\ &=\underbrace{(XC+(C^{-1}B)^T)\cdot (XC+(C^{-1}B)^T)^T}_{\ge 0} - \underbrace{(C^{-1}B)^T\cdot (C^{-1}B)}_{= B^TA^{-1}B} \end{align}$$
The equality occurs if and only if $XC+(C^{-1}B)^T=0 \iff XA + B^T = 0 $.
Remark: You can denote $Y = XC$ and compute the Jacobian of $I$ with regard to $Y$ and obtain the same result.