As for this problem, the answer would be most probably and most likely to be A. adjective.
The sentence that says "the boy with the yellow hair ran home" is a simple sentence. Adjectives describe nouns and pronouns while adverbs describe the verbs, other adjectives, and other adverbs. As you can notice, the yellow would be describing the hair of the boy and the phrase "with the yellow hair" pertains to the boy. So the most probable answer to this question would be A. adjective.