Let the sides of the squares be ‘(X)’cms and ‘(Y) cms.
∴ X2 + Y2 = 640 –––––(i)
∵ Area = (Side)2
∵Perimeter = 4 (Side)
∴4X – 4Y = 64
On simplifying further,
X – Y = 16 ––––––(ii)
Squaring the above mentioned equation, i.e., equation (ii)
X2 + Y2 – 2XY = 256
Using the identity of a2 + b2 – 2ab = (a – b)2
Putting the value of equation (i) in equation (ii)
∴ 640 – 2XY = 256
2XY = 384
XY = 192
Putting the value of X = Y + 16 in equation (i)
(Y+16)2 + Y2 = 640
Y2 + 256 + 32Y + Y2 = 640
2Y2 + 32Y – 384 = 0
Y2 + 16Y – 192 = 0
On applying Sreedhracharya formula

∴ X = – 12 or 24.
∴ the side is X = 24 cms (Only positive values), other square’s side is Y=X–16 i.e., 8 cms.