It can be seen from the first four numbers that two small numbers in each number represent two numbers respectively. When two small numbers intersect, the number represented by the outer number is subtracted from the number represented by the inner number, and when they do not intersect, the two numbers are added.
The circle represents 2.
The square stands for 1.
The triangle represents 5.
In the fifth picture, there are triangles and circles, which do not intersect.
So the result is 5+2=7.