![enter image description here](https://i.stack.imgur.com/9WkZf.jpg)

In the solution of above question, the authors of the book I'm reading solved it by changing the reference frame from the ground frame to the frame of the center of mass of the masses. But we know that, to move from one frame to another, we have to subtract the mass times acceleration product. But in the above case, the pseudo-force is applied in two opposite direction.

> 
> Is their any other approach to solve it from ground frame?
> 
> 
>