The two reactions given in the question belong to the standard conversion of an aromatic 1,2-dicarboxylic acid into its cyclic anhydride and back to the acid.
Case 1: Formation of the anhydride
Heating any 1,2-dicarboxylic acid (for example, phthalic acid) with a strong dehydrating agent such as $$P_2O_5$$ or concentrated $$H_2SO_4$$ removes one molecule of water intramolecularly and gives the corresponding cyclic anhydride.
The anhydride possesses two C=O bonds - one on each side of the bridging oxygen:
$$\text{O=C-O-C=O}$$
Hence, in the major product $$\mathbf{X}$$ (the anhydride) the total number of carbonyl groups is
$$n_{C=O}(X)=2$$
Case 2: Hydrolysis of the anhydride
When the anhydride $$\mathbf{X}$$ is treated with water (acidic, basic, or even neutral), the ring opens to regenerate the original 1,2-dicarboxylic acid.
Each -COOH group contains one carbonyl bond, so the dicarboxylic acid $$\mathbf{Y}$$ again has two C=O bonds:
$$n_{C=O}(Y)=2$$
Sum of carbonyl groups
$$n_{C=O}(X)+n_{C=O}(Y)=2+2=4$$
Therefore, the required sum is 4.
Final answer: 4.00