The country names can be identified from the flags in the grid as follows:
???? HAITI INDIA SYRIA
IRAN SERBIA ???? TUNISIA
UKRAINE PERU ITALY DJIBOUTI
Likewise with the options at the bottom:
TANZANIA SWITZERLAND SYRIA CANADA THAILAND
Reading the first letters of the countries in the grid gives "?HISIS?TUPID". It can be assumed that the phrase is supposed to read "THIS IS STUPID", so the two missing countries must start with the letters T and S, respectively.
[Thanks to Stiv in the comments for figuring the following part out!]
The other link between the countries in the grid is that the general name for someone who is from each of those countries ends in -IAN (e.g. Haitian, Indian, Syrian, Iranian). From this, we can deduce the correct flag to put in each spot. Someone from Tanzania is called a TanzanIAN, while someone from Thailand is called a Thai, and someone from Syria is called a SyrIAN, while someone from Switzerland is called a Swiss. Therefore, the correct options are TANZANIA and SYRIA.