Remember that an important property of a function is that to every element in it's input set, the function must assign a unique element from its output set. So,
For part (a): the people's names are the input set and the SSN numbers are the output set. This means that we must check that for each person's name, only one SSN number can be assigned to it. Since no person's name appears more than once we have a function
in this case. If someone's name appeared more than once, and the name wasn't assigned the exact same SSN each time it appeared, than this would not be a function.
For part (b): the SSN numbers are the input set and the people's names are the output set. This means that we must check that for each SSN, only one name is assigned to it. Since no SSN number appears more than once, this too is a functoin. However, if
two different people had the same last four digits of their SSN in this list, than this would not be a function.
In conclusion, both part (a) and (b) are functions.