The logic follows here is : The inside image has a side more than the outside image.
Option
Outside image
Inside Image
1.
Triangle (3)
Square (4)
2.
Hexagon (6)
Pentagon (5)
3.
Pentagon (5)
Hexagon (6)
4.
Heptagon (7)
Octagon (8)
Option (2) has a hexagon on the outside with 6 sides while the inside is a pentagon with 5 sides which is less than the outside image. Thus, it doesn't follow the pattern. Hence, the correct answer is "Option (2)".