If the sides are a and b then the area is ab and the length of the diagonal is sqrt(a^2+b^2). So if area=A, then b=A/a and if diagonal length is D then D^2=a^2+b^2=a^2+A^2/a^2. Therefore a^2D^2=a^4+A^2. So a^4-a^2D^2+A^2=0 and a^2=(1/2)(D^2+sqrt(D^4-4A^2)). The two roots of this correspond to a^2 and b^2. To find a and b we just take the positive square root of the two roots (zeroes).
Example: A=60 and D=13. a^2=(1/2)(169+sqrt(28561-14400))=(1/2)(169+sqrt(14161))=(1/2)(169+119)=(1/2)(50) or (1/2)(288)=25 or 144. So a = 5 and b = 12.