Much of this is setting up the problem. So if you're familiar it's likely best to start from the very bottom and work up if needed. The question is asking about the income and substitution effect.
Constrained max setup where $U = U(x,y) = (x+2)(y+1)$ with $U_x, U_y > 0$ and subject to budget constraint: $x P_x + y P_y = B$.
The comparative static identities: $$ \begin{array}{r}B-x^{*} P_{x}-y^{*} P_{y} \equiv 0 \\ U_{x}\left(x^{*}, y^{*}\right)-\lambda^{*} P_{x} \equiv 0 \\ U_{y}\left(x^{*}, y^{*}\right)-\lambda^{*} P_{y} \equiv 0\end{array} $$ I take the total differentials, $$ \begin{aligned}-P_{x} d x^{*}-P_{y} d y^{*} &=x^{*} d P_{x}+y^{*} d P_{y}-d B \\-P_{x} d \lambda^{*}+U_{x x} d x^{*}+U_{x y} d y^{*} &=\lambda^{*} d P_{x} \\-P_{y} d \lambda^{*}+U_{y x} d x^{*}+U_{y y} d y^{*} &=\quad \lambda^{*} d P_{y} \end{aligned} $$ then for the effect of $P_x$, we set $dP_y = dB = 0$ and $dP_x \neq 0$ and divide all three equations by $dP_x$. With Cramer's rule on $$ \left[\begin{array}{ccc}0 & -P_{x} & -P_{y} \\ -P_{x} & U_{x x} & U_{x y} \\ -P_{y} & U_{y x} & U_{y y}\end{array}\right]\left[\begin{array}{c}\left(\partial \lambda^{*} / \partial P_{x}\right) \\ \left(\partial x^{*} / \partial P_{x}\right) \\ \left(\partial y^{*} / \partial P_{x}\right)\end{array}\right]=\left[\begin{array}{c}x^{*} \\ \lambda^{*} \\ 0\end{array}\right] $$ we get $$ \begin{aligned}\left(\frac{\partial x^{*}}{\partial P_{x}}\right) &=\frac{1}{|J|}\left|\begin{array}{ccc}0 & x^{*} & -P_{y} \\ -P_{x} & \lambda^{*} & U_{x y} \\ -P_{y} & 0 & U_{y y}\end{array}\right| \\ &=\frac{-x^{*}}{|J|}\left|\begin{array}{ll}-P_{x} & U_{x y} \\ -P_{y} & U_{y y}\end{array}\right|+\frac{\lambda^{*}}{|J|}\left|\begin{array}{cc}0 & -P_{y} \\ -P_{y} & U_{y y}\end{array}\right| \\ & \equiv T_{1}+T_{2} \quad\left[T_{i} \text { means the } i \text { th term }\right] \end{aligned} $$ First it was shown that by setting effective income loss from a change in $P_x$ to zero: i.e. the first equation of the total differential below we set $x^* dP_x = 0$, we compensate the income effect and get: $$ \left(\frac{\partial x^{*}}{\partial P_{x}}\right)_{\text {compensated }}=\frac{1}{|J|}\left|\begin{array}{ccc}0 & 0 & -P_{y} \\ -P_{x} & \lambda^{*} & U_{x y} \\ -P_{y} & 0 & U_{y y}\end{array}\right|=\frac{\lambda^{*}}{|J|}\left|\begin{array}{cc}0 & -P_{y} \\ -P_{y} & U_{y y}\end{array}\right|=T_{2} $$ And can express the derivative: $\left(\frac{\partial x^{*}}{\partial P_{x}}\right)=T_{1}+T_{2}=\underbrace{-\left(\frac{\partial x^{*}}{\partial B}\right) x^{*}}_{\text {income effect }}+\underbrace{\left(\frac{\partial x^{*}}{\partial P_{x}}\right)_{\text {compensated }}}_{\text {substitution effect }}$
Text Question: When studying the effect of $dP_x$ alone, the first equation (of the total differentials) reduces to $-P_{x} d x^{*}-P_{y} d y^{*}=x^{*} d P_{x}$, and when we compensate for the consumer's effective income loss by dropping $x^{*} d P_{x}$, equation becomes $-P_{x} d x^{*}-P_{y} d y^{*}=0$. Show that last result can be obtained from a compensation procedure where we keep consumer's optimal utility level $U^*$ (rather than effective income) unchanged, so that the term $T_2$ can be interpreted as $(\partial x^{*} / \partial P_x)_{U^* = \text{constant}}$ [Hint: Make use of $\frac{U_{x}}{U_{y}}=\frac{P_{x}}{P_{y}}$]
Text Answer: Optimal utility is $U^{*}=U^{*}\left(x^{*}, y^{*}\right)$. Thus $d U^{*}=U_{x} d x^{*}+U_{y} d y^{*}$ where $U_x, U_y$ evaluated at optimum. When $U^*$ constant, we have $dU^* = 0$ or $U_{x} d x^{*}+U_{y} d y^{*}=0$. From the above expression for $\left(\frac{\partial x^{*}}{\partial P_{x}}\right)$ we have $\frac{U_{x}}{U_{y}}=\frac{P_{x}}{P_{y}}$. Thus we can express $d U^{*}=0$ by $P_{x} d x^{*}+P_{y} d y^{*}=0$, or $-P_{x} d x^{*}-P_{y} d y^{*}=0$
Q: How exactly does $ 0 =\boldsymbol{U}_{x} d x^{*}+\boldsymbol{U}_{y} d y^{*}$ turn into $-P_{x} d x^{*}-P_{y} d y^{*}=0$?