Reason for applying energy conservation and balancing force

I've this question

When asked I was told that we will balance force for $$2m$$ object

i.e., $$(2\mu)2mg=Kx$$

And we will conserve energy for $$m$$ mass

i.e., $$Fx=\frac{1}{2}kx^2+\mu mgx$$

Both the blocks are attached to the same spring so why is it wrong to balance forces for both the masses. I want to know why can't we do vice versa rather how does the solution work

I am not asking for calculations or answer to a homework question but asking for a concept involved.

• I was writing an answer to your egg question when the question was deleted, so I lost it. Have a look here greekreporter.com/2021/05/01/… . The reason eggs break is 1) air bubbles which are bigger the older the egg, 2) thickness of skin 3) previous undetected cracks May 22 '21 at 5:22
• @annav thank you so much I was getting downvotes so I closed it May 22 '21 at 5:42

The question specifically says that $$F$$ is the minimum force needed to move the $$2m$$ mass. As the spring extends by a length $$x_{\circ}$$, the smaller mass $$m$$ has an acceleration due to the net force provided $$F$$, friction and spring force.
As no data about the acceleration is provided in the question we cannot balance any force equation for mass $$m$$ without knowing its acceleration.