The question has given us the parts of C:H:O in the ratio 6:1:8 lets assume we have 6g C, 1g H and 8g Oxygen.
C=6/12=1/2/1/2=1(finding the lowest whole no. ratio)
Thus the empirical formula of the compound is CH2O but the question is asking for the molecular formula and we know that Molecular formula=n* empirical formula looking at the answer options only option 2 makes sense as it has the same simplest ratio of Atoms.
Hope it helps:)