From the problem we know
P = 16W
L = W + 12
We also know
P = 2L + 2W
Let's substitute the expressions for P and L in the equation above.
16W = 2(W+12) + 2W
and solve for W
16W = 2W + 24 + 2W
16W = 4W + 24
12W = 24
W = 2
Since L = W + 12
L = 2 + 12
L = 14
Now let's check
P = 2L + 2W
P = 2(14) + 2(2)
P = 28 + 4 = 32
P = 16W
P = 16(2)
P = 32