Hello!
Let's put this as a system of equations.
24=2l+2w
l=w+3
Let's plug this l value into the first equation.
24=2(w+3)+2w
24=2w+6+2w
24=4w+6
Now we subtract 6 from both sides.
18=4w
Divide both sides by 4.
w=4.5
Now we just add 3 to find length.
L=7.5
Note that these numbers to work in our original equation.
Width: 4.5 inches
Length: 7.5 inches
I hope this helps!