The average molar mass of a mixture of methane

The average molar mass of a mixture of methane and ethane present in the ratio of a: b is found to be 20.0 g ${{mol}^{-1}}$. If the ratio were reversed, what would be the molar mass of the mixture?

Molar mass of methane = 16 g ${{mol}^{-1}}$
Molar mass of ethane = 28 g ${{mol}^{-1}}$
When they are present in the a:b their average molar mass = a x 16 + b x 28 /a + b = 20 g ${{mol}^{-1}}$

i.e., 16a + 28 b = 20(a+b)
or 4a + 7b = 5 (a+b)
or a = 2b
or a/b = 2/1 = 2:1
If the ratio is reversed, now the ratio
a:b = 1:2
Average molar mass = 1x16 + 2x28/1+2
= 24 g ${{mol}^{-1}}$