solve for w, P=2l+2w

could you please show me how this is done and explain the rules. i'm hopelessly lost with this. thanks.

P=2l+2w (move 2w to the other side)

-2w=2l-p
2w=2l+p
w=2l+p/2 (make everything equal to w and cancel whatever is possible in this case 2)
w = l+p (Final Answer)
Hope this helps!!