Which flag should replace the question mark?
Hmmm, some of those country names are pretty long. If only we could do something about that...
The countries are:
China + Belgium = Latvia
Costa Rica + Canada = Russia
Portugal + Madagascar = Thailand
Slovenia + Brasil = ?
According to the hint, we should use abbreviations of the countries, though. Let's use the top level domains:
cn + be = lv
cr + ca = ru
pt + mg = th
si + br = ?
There doesn't seem to be a way of making these equations valid sums by converting bases or enumerating letters, but we can turn these abbreviations to numbers by ...
... considering them as symbols of chemical elements, whose atomic numbers we use:
Copernicum (112) + Beryllium (4) = Livermonium (116)
Chromium (24) + Calcium (20) = Ruthenium (44)
Platinum (78) + Magnesium (12) = Thorium (90)
Silicon (14) + Bromine (35) = Indium (49)
So the flag that should replace the question mark is ...