Assuming D as the origin. DC as x-axis and DA as y-axis we have
m1=1kg,(x1,y1)=(0,1m)
m2=2kg,(x2,y2)=(1m,1m)
m3=3kg,(x3,y3)=(1m,0)
m4=4kg,(x4,y4)=(0,0)
Coordination of their CM are calculated as follows.
xCM=m1x1+m2x2+m3x3+m4x4m1+m2+m3+m4
=(1)(0)+2(1)+3(1)+4(0)1+2+3+4
510=12m=0.5m
Similarly, yCM=m1y1+m2y2+m3y3+m4y4m1+m2+m3+m4
=(1)(1)+2(1)+3(0)+4(0)1+2+3+4
=310m=0.3m
∴(xCM,yCM)=(0.5m,0.3m)