For centre of mass to be at centre of square the X and Y coordinates of centre of mass should be zero.
Xcm=m1x1+m2x2+m3x3+m4x4m1+m2+m3+m4
(2m1)(−x)+(4m2)(x)+(m3)(x)+(m4)(−x)=0
m4=3m
Ycm=m1y1+m2y2+m3y3+m4y4m1+m2+m3+m4
(2m1)(−x)+(4m2)(−x)+(m3)(x)+(m4)(x)=0
m4=5m
So we get different value of m4 for both X and Yco ordinate of centre of mass to be zero, which is not possible.