L=7 w=2
First write an equation to find the dimensions. You know l=5+w and p=18. Using this you can create the equation:
18=2(5+w)+2w
The 2s come from there being 2 sides that are the length and 2 sides that are the width.
Next solve for w. Distribute the 2, then add the common terms, next subtract the 10 and divide by 4.
18=10+2w+2w
18=10+4w
8=4w
W=2
Now that you have the width you can do one if two things to find the length. Either use the equation p=2l+2w or l=5+w
P=2l+2w
18=2l+2(2)
18=2l+4
14=2l
L7
L=5+w
L=5+2
L=7