To be a function, for any X value( input) you can only have one Y(output value).
In A) there are two x values of 2, but each one has a different Y value, so this cannot be a function.
In C, there are two x values of 1, each with a different Y value, so also cannot be a function.
D) has two X values of 0, and each has a different Y value so cannot be a function.
The correct answer would be B.