From perimeter formula p = 2(l + w)
L is not known so se will write it in terms of w
P = 6w + 8
2(l + w) = 6w + 8
Divide both sides by 2
l + w = 3w + 4
Subtract w from both sides
l + w - w = 3w - w + 4 => l = 2w + 4
From the area formula
A = l * w
Substitute 2w + 4 in place of l
A = (2w + 4) * w
A = 2w^2 + 4w