The image combines two separate exposures taken on November 20, 2016, by the High Resolution Imaging Science Experiment (HiRISE) camera on NASA’s Mars Reconnaissance Orbiter. The satellite was about 205 million kilometers (127 million miles) away from Earth when the images were acquired. For comparison, the circumference of the Earth at the equator is about 40,000 kilometers (25,000 miles). The distance between Earth and the Moon is about 30 times the diameter of Earth.
The images were taken in order to calibrate HiRISE data, since the reflectance of the Earth-facing side of the Moon is well known.