The answer is b. II and IV only.
Let's go through all choices:
I. DNA is a nucleic acid, whereas RNA is a protein. - Both DNA and RNA are nucleic acids.
II. DNA stores genetic information, whereas RNA is directly involved in protein production. - That's right. Genes are sections of DNA that carry genetic information. Based on that sequence, mRNA is synthesised and takes place in protein production.
III. Both DNA and RNA always contain the nitrogenous base thymine. - Only DNA contains thymine, while in RNA uracil is present instead of thymine, All other nitrogenous bases (adenine, guanine, cytosine) are common for both molecules.
IV. DNA contains the sugar deoxyribose, whereas RNA contains the sugar ribose. - That's right. That is why DNA is called deoxyribonucleic acid, and RNA is called ribonucleic acid.