We know that,
m=1000Kf×wW×△T
Molecular mass of AB2 (from given data) = 1000×5.1×120×2.3
=110.86
and Molecular mass of AB4 (from given data) =100×5.1×11.3×20
=196.15
Further, AB4=A+4B=196.15 ...(i)
AB2=A+2B=110.86 ...(ii)
Subtracting eq. (ii) from (i),
2B=85.29
B=42.645
Putting the value of B in eq. (ii),
A+85.29=110.86
or A=110.86−85.29=25.57
Thus, the atomic masses of A and B are 25.57 and 42.645 respectively.