Pressure of $1 \,g$ of an ideal gas $A$ at $27 \, ^{\circ}C$ is found to be $2$ bar. When $2 \,g$ of another ideal gas $B$ is introduced in the same flask at same temperature the pressure becomes $3$ bar. What would be the ratio of their molecular masses?