At the time of the origin of the earth every planet and meteorites were floating in the space and the materials of the earth were same as that of the meteorites. So, the scientists can calculate the composition of rocks ofthe earth by studying the materials found in the meteorites.