The problem is defined as follows: $$ \min_X tr(X^T A X)-\alpha tr(X^T B) $$ I want to get the equal perfect square equation as that above, that is $$ \min_X \| X-C\|_F^2 $$ where $C$ is related to $A$ and $B$. Is it possible? How to derive the perfect square equation?
UPDATED: This problem is from this paper. In Eqn. (15), the authors have derived a Lagrange function, but I'm not sure whether the following term in Eqn. (15) is right when optimizing the $J_n$. From the Eqn. (15), we have $$ \min_{J_n} \sum_{n=1}^{N}\|J_n\|_* + \lambda \|J_n^T(W_b-\alpha B_n)J_n\|_F^2 -tr(V_2^TJ_n) +\frac{\mu}{2}\|U_n-J_n\|_F^2 $$ The authors have wrote an equal optimization problem in the first equation of Eqn. (16) of the paper. But I was confused with it for a long time. And I also made a post in this link to ask for a favor, but @user1551 also thought the term $\lambda \|J_n^T(W_b-\alpha B_n)J_n\|_F^2$ in the equation above couldn't be changed into the perfect square form in Eqn. (16).
Thus, I've tried to change the term $\lambda \|J_n^T(W_b-\alpha B_n)J_n\|_F^2$ into $\lambda tr(J_n^T(W_b-\alpha B_n)J_n)$, and make a derivation as follows:

But I still couldn't get the perfect square form. Thus I made this post for your kind help. If convenient, could you help derive it, please?
As noted by copper.hat, this is not always possible.
In particular, in your second problem, there is no coupling between the different entries in the array $X$. In particular, each entry $X_{ij}$ solves the one-dimensional problem $$\min_{X_{ij}} (X_{ij} - C_{ij})^2.$$
In the general case, this decoupling is not possible for the first problem.