A function is defined as a set of points for every x-value, there is only one y-value.
So, you can't have two y-values for every x-value.
Thus, (B) would be a relation, because x = 7 has two y-values, and as such, doesn't satisfy the condition of a function.