The perimeter of a certain polygon is the sum of the measures of all its sides. If we are to use this concept with the given polygon above then that would be,
P = (3x + 1) + x + x + ?
We are also given that the perimeter is equal to 6x + 2. We substitute this to the equation derived,