Let the shorter side be x m.
Then diagonal = (x + 25)m and longer side = (x + 23 )m.
We known that each angle of a rectangle is 90°.
In a right ∆ABC, we have (x + 25)2 = (x + 23)2 + x2

x2 + 50x + 625 = x2 + 46x + 529 + x2
⇒ 2x2 + 46x + 529 – x2 – 50x – 625 = 0
⇒ x2 – 4x — 96 = 0
⇒ x2 – (12 – 8)x – 96= 0
⇒ x2 – 12x + 8x – 96 = 6
⇒ (x2 – 12x) + (8x – 96) = 0
⇒ x(x – 12) + 8(x – 12) = 0
⇒ (x – 12) (x + 8) = 0
⇒ x – 12 = 0 and x + 8 = 0
⇒ x = 12 and x= – 8 (Reject)
Hence, longer side = 12 + 23 i.e., 35 m and shorter side = 12 m.