Then according to the problem, the length will be X, The width will be X-9; the length of the diagonal is (X-6). The area is equal to length times width = 580 = X*(X-9)= X^2 - 9x, readjusting the equation we obtain
X^2 - 9X -580 =0; solving this quadratic and using the positive root, the result is that the length value comes to be 29, the width will be 20. Checking Pythagoras we have that 23^2 = 20^2 + 29^2. and will give that is more than the 20+3 given in the problem. Check the data.