First of all, perimeter is the distance around the edge of a shape. Since EFGH is a square, all sides are equal, and if you count, each side is 3 units. A square has four sides, so 3 times 4 equals 12.
Although, looking at your math problem, if you’re supposed to use the number inside the square as a side length, then 2 is the length, and 4 sides so 8 would be perimeter if that’s the case.