You can put this solution on YOUR website!
You have two questions here.
for the long side of the rectangle is x,
the short side of the rectangle is y,
short leg of triangle=a
long leg of triangle=b
3a+asqrt3=24, a(3+sqrt3)=24, a=24/(3+sqrt3)
if we multiply the denominator with (3-3sqrt3)