2 is an x-value in the table and also a y-value in the table, so it is in both the domain and range of the function.