From Pascal's law,
F1A1=F2A2
⇒4m1gπd21=4m2gπd22
⇒100d21=md22
⇒d21d22=100m ...(1)
When the diameter of the larger piston is increased by 4 times and that of the smaller piston is decreased by 4 times, keeping the same mass m on the smaller piston,
d′12d′22=(4d1)2(d2/4)2=256×d21d22
⇒d′12d′22=25600m ...(2)
[from (1)]
Again from Pascal's law,
d′12d′22=Mm
⇒25600m=Mm
[from (2)]
⇒M=25600 kg