Coal a is a chemical compound. It is pure carbon. You cannot separate carbon into other molecules without changing its chemical consitution.
Petroleum is a mixture of many chemical compounds, hydrocarbons, plus other elements. Petroleum components contain carbon, hydrogen, oxygen, nitrogen, sulfur, and some metal traces. The different compounds that consitute the petroleum can be separated by physical media like distillation.