It might seem that there is not enough information to solve this problem. But the fact is that there is enough information to find the perimeter.
Here's a non-visual solution which some may find more easy to understand than a visual solution:
Assume that the picture has north at the top. Suppose that we start at the northwest corner and begin walking east, and then continue following the figure until we get back to the northwest corner again.
The total distance that we walk east is 9 + 12 = 21, so the total distance that we walk west must be 21 as well. The total distance that we walk north is 15, so the total distance that we walk south must be 15 as well.
So the total distance that we walk overall is 21 + 21 + 15 + 15 = 72.
To me the most visually intuitive solution is as follows:
First of all,
A principled solution:
The perimeter length of
2 x sum of given lengths
follows from the following
Let P be a polygon with only right angles. Then the sum of all up facing sides equals the sum of all down facing sides and the sum of all left facing sides equals the sum of all right facing sides.
(We have WLOG turned the polygon so its sides face up, down, left and right.)
A technically 100% kosher (or halal if you prefer) proof is probably equally difficult as it is tedious. But, informally: This is certainly true for rectangles and remains true if we glue finitely many rectangles together which is all we need to do to build any such polygon.
An intuitive solution:
red is 15, blue 9, green 12
Perimeter is 2 x (red + blue + green) = 72.
In each of two steps rotate the highlighted bit of the perimeter by 180 degrees.
The same principle presented more aesthetically but maybe not fully self-explanatory:
If we want to find the sum of all the vertical sides we have 15 and the other vertical sides on the right all add up to 15, giving us a vertical sum of 30. But if we want to find the horizontal sum, we will have to find the overlap between the 9 and 12 sides. Let the overlap be x. The bottom horizontal side will be 12 + 9 - x = 21 - x. However, the two sides that are labeled 12 and 9 add up to 21 and when including the overlapped side, we have an extra x, giving 21 + x. The -x and the +x cancel to give 42 + 30 = 72 for the perimeter.
A visual solution, without so much math:
assign x to the unlabeled horizontal length in the middle
assign y to two of the unlabeled vertical lengths, and (15 - 2y) to the other
starting in the lower-left corner and going up, walk the perimeter:
15 + 9 + y + x + y + 12 + (15 - 2y) + (12 - x + 9) = 72 + x - x + 2y - 2y = 72
I made a GeoGebra graph to show why the length of the cut-in doesn't matter. There is a slider for the length of the cut-in that can be modified to any value between 0 and 9 (the length of the top edge).
As others have noted, the perimeter is always 72.
A non-visual approach:
However long the two unlabeled horizontal sides are, their sum must always be the same: the shorter the short segment is, the longer the long segment will be, and vice versa. If we set the length of the shorter segment to zero, we see that this sum must be 21 (the sum of 9 and 12). Therefore, the perimeter is 2 x (15 + 21) or 72.