Let z mole oxalic acid and y mole of formic acid be heated with conc. H2SO4.
According to the following equations:

Total moles of gaseous mixture = Moles of CO + Moles of CO2
= (x + y)mol + x mol = (2x + y)mol
Now, KOH absorbs only CO2 i.e., x moles and the volume of the solution decreases by \(\frac{1}{6}\)th of its volume. Since, equal volumes of gases have equal number of moles, according to Avogadro's Law.
\(\frac{Moles\,of\,CO_2}{Moles\,of\,both\,the\,gases}\) = \(\frac{\mathrm{x}}{(2\mathrm{x}+4)}\)
\(\Rightarrow\) 6x = 2x + 4
\(\Rightarrow\) 4x = 4
\(\Rightarrow\) \(\frac{\mathrm{y}}{\mathrm{x}}\) = 4
\(\therefore\) Molar ratio of Formic acid: Oxalic acid = 4 : 1