Let say x be the number of feet by which Zelda decreases one dimension. She also increases the other dimension by x as shown below.
The dimensions of new deck are 24-x and 24+x. Given that its area is 512 square feet, we can find the dimensions.
(24-x)(24+x)=512
To find x, we will use difference of squares pattern.