In the question figure, there are 3 square and 2 triangles. There are no squares in the first and third figure, hence they are eliminated. Also, in the second option, there are 3 triangles, thus it is not possible. In the last option, there are 3 squares and 2 triangles which is the requirement.