First begin by making w the subject of formula
p = 2l + 2w
p-2l = 2w ( moving 2l to the left hand side )
[tex]\begin{gathered} \\ \frac{p\text{ - 2l}}{2}\text{ = w ( now we've made w the subject )} \end{gathered}[/tex]next substitute in your values p = 52 and l = 18
[tex]w\text{ = }\frac{p\text{ - 2l}}{2}\text{ = }\frac{52\text{ - 2(18)}}{2}\text{ = }\frac{52\text{ - 36}}{2}\text{ = }\frac{16}{2}\text{ = 8}[/tex]
Therefore the value for w in the expression is 8