Given, methanol $=20\,mL$
Water $=8\,mL$
density of methanol $=0.793\,kg L ^{-1}$ or $0.793\,gmL ^{-1}$
density of solution $=0.964\,kg L ^{-1}$ or $0.964\,gmL ^{-1}$
As, density $=\frac{\text { mass }}{\text { volume }}$
$\therefore$ mass/weight of methanol
$=0.793\,g \,mL ^{-1} \times 20 \,mL =15.86 \,g$
Similarly weight of solution
$=0.964\,g \,mL ^{-1} \times 80 \,mL =96.4 \,g$
We know that,
$\%$ by weight $=\frac{\text { weight of solute }}{\text { weight of solution }} \times 100$
$=\frac{15.86 g }{96.4\,g } \times 100=16.45$