Answer
$$W=\dfrac{S-2LH}{2H+2L}$$
Work Step by Step
The given formula:
$$S=2HW+2LW+2LH$$
Move $2LH$ to the left side and change the sign:
$$S-2LH=2HW+2LW$$
Factor out $W$ on the right side:
$$S-2LH=W(2H+2L)$$
Swap the sides:
$$W(2H+2L)=S-2LH$$
Divide both sides by $2H+2L$:
$$W=\dfrac{S-2LH}{2H+2L}$$