This passage uses a combination of comparison and contrast and development.
This part uses comparison between petroleum and coal (it highlights the common aspects):
"Both
petroleum and coal are made up of complex carbon-based molecules, and
both originated with living creatures of some kind. Both are vital
sources of energy for the modern world and both were formed by geologic
processes over millions of years"
This part uses contrast (it highlights the differences):
"However, petroleum was mainly formed from the remains of ocean-dwelling
microorganisms. Coal, on the other hand, originated from decayed
vegetation in ancient swamps and bogs."
This part also uses comparison:
"In any case, it took millions of years for both coal and oil to be produced"
And this last sentence is the use of development:
"This
is the case because it took that much time for overlying sediments to
produce the unimaginable heat and pressure that would one day allow us
to harvest these energy resources"
Because the writer deepens into some aspects,explaining some characteristics of the fenomena or supporting the idea.