Answer:
your answer is correct for the reason you state
Explanation:
A one-to-one function must pass the horizontal line test: no horizontal line intersects the graph at more than one place.
Here, the horizontal line y=3 intersects at x=1 and x=2, so the test fails.