Answer: The gas in bottle B must be at four times the absolute temperature (in kelvin) of the gas in bottle A.
Given: mass of helium in A, \(m_A = 10\) g; in B, \(m_B = 40\) g. The bottles are identical, so the volume \(V\) is the same.
Density: \(\rho_A = \dfrac{10}{V}\), \(\rho_B = \dfrac{40}{V}\), so \(\rho_B = 4\rho_A\).
The speed of sound in a gas increases with temperature and decreases with density: \(v \propto \sqrt{\dfrac{T}{\rho}}\), where \(T\) is the absolute temperature.
Since \(v_A = v_B\):
\(\dfrac{T_A}{\rho_A} = \dfrac{T_B}{\rho_B}\)
\(\dfrac{T_B}{T_A} = \dfrac{\rho_B}{\rho_A} = \dfrac{40}{10} = 4\)
\(T_B = 4\,T_A\)
Conclusion: At the same temperature sound would travel slower in B, because B is 4 times denser. Since the speeds are equal, the bottles must be at different temperatures: the absolute temperature of the helium in bottle B is 4 times that in bottle A.