Let s be the side of the square. The length of the rectangle is 3s and its width is equal to s - 2. From the given condition,
A (square) = A (rectangle)
s² = (3s)(s - 2)
s² = 3s² - 6s
-2s² = -6s
s = 3
Thus, the length of the rectangle is 9 and its width is 1