By definition "a function may NOT have two y-values assigned to the same x-value, [but] it may have two x-values assigned to the same y-value."(https://mathbitsnotebook.com/Algebra1/Functions/FNFuncBasics.html)
Set A has follows this set of rules while Set B does not. Also if we graph it, Set B does not pass the vertical line test. (Learn about the vertical line test in the link below).