Why should $dp_2=dm =0$ in this problem?
The assumption $dm =0$ says that we examine the behavior of the consumer under a fixed nominal income, and this is something interesting to study, because it aligns to a large degree with the observed reality of many people that have approximately constant income.
The assumption $dp_2=0$ assumes away general equilibrium effects, since we are looking at changes in $p_1$ which is price in one market, while $p_2$ is the price in another market, presumably of a different good. So while formally the justification here is that &quot;we do partial equilibrium analysis&quot;, the vindication of partial equilibrium analysis is that the effects from changes in one goods market to another goods market take some time to materialize, so partial equilibrium analysis has relevance to the real world.
So we see that the assumption $dm=dp_2=0$ is not &quot;necessary to find the correct solution&quot; (there is not one correct solution, but solutions each consistent with the corresponding assumptions made). But it is neither an &quot;arbitrary&quot; set of assumptions, on the contrary, it has a specific logic and purpose for which it is imposed.
The OP asked in the comments

&quot;Then why not also assume that $d\lambda=0$&quot;?

But the optimal value of lambda is endogenous to the model, and it summarizes aspects of the consumer's optimal behavior. So whether it changes or stays constant is for the model to tell us.