The perimeter of a rectangle is calculated adding the length of each side
The opposite sides of a rectangle have the same length
Then, the perimeter is:
P = 2x + (x + 4) + 2x + (x + 4)
Combining similar terms:
P = (2x + x + 2x + x) + 4 + 4
P = 6x + 8