.
Let x and y be the dimensions of the first rectangle.
We have xy = 24 for its area.
The dimensions of the second rectangle are (x-4) and (y+1) with the equation for the area
(x-4)*(y+1) = 24, or
xy + x - 4y - 4 = 24.
Replacing here xy by 24, based on the very first equation, we get
24 + x - 4y - 4 = 24,
or, after collecting/canceling common terms
x - 4y = 4. (*)
So, we have now two equations
xy = 24 (1)
x = 4 + 4y. (2)
By substituting (2) to (1), you get a quadratic equation
(4+4y)*y = 24
(1+y)*y = 6
At this point, you can solve it as a quadratic equation
or GUESS the solution mentally y = 2.
ANSWER. The dimensions of the first rectangle are 2 cm (the width) and 24/2 = 12 cm (the length).
Solved.