This is a tricky problem, but I think your teacher is implying that the first variable is the input while the second variable is the output. If that is the case, then the answer is most likely choice B. The weight of a person (input) leads to many possible heights (output). Someone who weighs more at a certain height will simply have more body mass.
Contrast this with choice C where the weight of an apple leads to exactly one cost. This is assuming you charge by the pound or gram or whatever unit of measure you use. Also, choice D is a function since any given time of day will lead to one temperature only. This is for one single location at this moment in time.