Since rectangles have two pairs of equal-length sides, for any rectangle with length L and width W, its perimeter is always 2L + 2W (or 2(L + w), whichever you prefer). Here, we're told that the width is 4 feet less than the length. Symbolically, we'd say that W = L - 4. This allows us to write the perimeter entirely in terms of length if we replace our W with the expression on the right side:
2L + 2W = 2l + 2(L - 4) = 2L +2L - 8 = 4L - 8
Sam wants this expression to come out to 52, so we can set up the equality 4L - 8 = 52 and solve for L to find what the length has to be:
Adding 8 to either side, the equality becomes 4L = 60. Diving either side by 4 gives us L = 15, which tells us that the length of the deck should be 15 feet.