Answer :

[tex]p=2(e+w) \\ p=2e+2w \ \ \ /-2w \\ p-2w=2e \ \ \ /:2 \\ \dfrac{p-2w}{2} =e \\ \dfrac{1}{2} (p-2w)=e \\ \dfrac{1}{2} p - w=e[/tex]
[tex]p=2(e+w)\\ p=2e+2w\\ 2e=p-2w\\ e=\dfrac{p-2w}{2}[/tex]