Answer
$$\sqrt{\frac{\gamma R T}{M}}
$$
Work Step by Step
Using $p=n R T / V=(m / M) R T / V$ with $\rho=m / V,$ we find the speed of sound in an ideal gas to be
$$
v_{s}=\sqrt{\frac{B}{\rho}}=\sqrt{\frac{\gamma p}{\rho}}=\sqrt{\frac{\gamma(m / M) R T / V}{m / V}}=\sqrt{\frac{\gamma R T}{M}}
$$