What you have so far is correct.
Problem 7 is a function because none of the x values repeat. Each x input goes to exactly one y output. The y values can repeat. If the y values repeat, then we don't have a one-to-one function.
In contrast, problem 8 is not a function. We have x = 1 go to y = 8 and y = 6 at the same time. This is one example showing we don't have one output for a given input.