Hint: The presence of atmosphere depends on the RMS speed of the air molecules and the temperature of the air depends on the kinetic energy of the molecules.
Step 1: Find the RMS speed of the air molecules at the surface of the moon.
(a) The moon has small gravitational force (pull) and hence, the escape velocity is small. The value of escape velocity for the moon is 4.6 km/s. As the moon is in the proximity of the earth as seen from the sun, the moon has the same amount of heat per unit area as that of the earth.
The air molecules have a large range of speeds. Even though the RMS speed of the air molecules is smaller than the escape velocity on the moon, a significant number of molecules have speed greater than escape velocity and they escape.
Now, the rest of the molecules arrange the speed distribution for the equilibrium temperature. Again a significant number of molecules escape as their speed exceeds escape speed.
Hence, over a long time, the moon has lost most of its atmosphere.
for moon = 4.6 km/s [=escae velocity]
Step 2: Find the change in temperature at a high altitude.
(b) As the molecules move higher; their potential energy increases and hence, kinetic energy decreases and hence, temperature reduces. At a greater height, more volume is available and the gas expands and hence, some cooling takes place.