First, let's see the points on the coordinate plane:
Now, let's remember that a function has every element of it's domain related with only one element from it's image.
Therefore, x = 2 would create a set of ordered pairs that is not a function. Let's see it in the plane:
As we can see, x = 2 has two values on the image: f(2) = 6 and f(2) = 7, and this never can happen in a function.