The material mined from earth and when heated strongly in an insufficient supply of air gives a solid fuel which is rich in carbon indicates that the material P is also very rich in carbon and hence the material has to be coal because coal is mined from earth and on incomplete combustion it gives a solid fuel.
The solid fuel Q is coke.
R obtained from trees which signify that wood is the only tree part which when heated in insufficient supply of oxygen gives a carbon-rich compound.
S obtained on burning wood is charcoal.
But none of the options match with our answers.
So correct answer is D.