In this question, we have to determine which compounds are insoluble in water, and even though each compound has its own particularity, we can define if it is soluble based on the anion (the negatively charged ion).
Mg3(PO4)2, most of the phosphates, group PO4^3-, are insoluble in water, and Magnesium phosphate will follow this rule
Li2CO3, carbonates are usually insoluble, but carbonates with group 1 metals are soluble, like Lithium
KOH, this is a base and it is soluble in water
BaSO4, most sulfates are soluble, but BaSO4 will be one exception to this rule
Therefore the compounds that are insoluble are Mg3(PO4)2 and BaSO4, the 1st and 4th options