The equation for the perimeter of the rectangle is:
[tex]\begin{gathered} l\colon\text{length} \\ w\colon\text{width} \\ P=2l+2w \end{gathered}[/tex]then an equation to find the widht is:
[tex]\begin{gathered} P=2l+2w \\ \Rightarrow P-2l=2w \\ \Rightarrow w=\frac{P-2l}{2} \end{gathered}[/tex]Now, if P=48 and l=18, then we have the following:
[tex]\begin{gathered} w=\frac{48-2\cdot18}{2}=\frac{48-36}{2}=\frac{12}{2}=6 \\ w=6 \end{gathered}[/tex]therefore, the width is 6 feet.