Answer
6 inches
Work Step by Step
$w=l-3$
$18=2l+2w$
$18=2l+2(l-3)$
$18=2l+2l-6$
$18+6=2l+2l-6+6$
$24=4l$
$\frac{24}{4}=\frac{4l}{4}$
$6=l$
Let's check:
$w=6-3$
$w=3$
$18=2\times6+2\times3$
$18=12+6$
$18=18$
The width of the rectangle is 3 inches, the perimeter is 18 inches, and the length (what we are solving for) is 6 inches.