(N/A) $(i)$ $A$ compound with the molecular formula $C_2H_4O_2$ that gives effervescence of $CO_2$ gas upon addition of sodium carbonate must possess a $-COOH$ group. Therefore,compound $(A)$ is $CH_3COOH$ (Acetic acid).
$(ii)$ Compound $(P)$ is the sodium salt of the acid,which is $CH_3COONa$ (Sodium ethanoate). When $(P)$ is heated with sodalime $(NaOH + CaO)$,it undergoes decarboxylation to give $CH_4$ gas. Thus,$(Q) = CH_4$ (Methane gas).
The reactions are:
$CH_3COOH + Na_2CO_3 \rightarrow CH_3COONa + CO_2 + H_2O$
$(A) \quad \quad \quad \quad \quad \quad \quad \quad (P)$
$CH_3COONa + NaOH \xrightarrow{\Delta, CaO} CH_4 + Na_2CO_3$
$(P) \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad (Q)$