Final answer:
In the given reaction, CuSO4(aq) and MgSO4(ag) are the compounds dissolved in water, as denoted by the (aq) after their chemical formulas.
Step-by-step explanation:
In the chemical reaction Mg(s) + CuSO4(aq) → Cu(s) + MgSO4(ag), the compounds that are dissolved in water are CuSO4(aq) (copper(II) sulfate) and MgSO4(aq) (magnesium sulfate). The notation (aq) stands for aqueous solution, indicating that the compound is dissolved in water. The compound Cu(s) and Mg(s) are indicated with an (s) which means they are solid and therefore not dissolved in the solution.