Well, they used the Kinetic Theory model, and did some maths to it.
Maxwell came up with the model for the root-mean-square (rms) molecular speed. It describes average molecular speed having a certain average molecular kinetic energy.
The equation is:
u is the average molecular speed
R is the molar gas constant (8.3145 J / mol K).
T is the absolute temperature (K)
Mm is the Molar mass of the gas (g / mol)
Source: General Chemistry 7th. Ebbing, Gammon. p. 214. © 2002 by Houghton Mifflin Company.