is injective, and what needs to be shown is ?
We want to prove an equality of sets so we need to prove two inclusions.
Let's start with the easy one, , where injectivity doesn't play any role.
Let . By definition, , so we have .
Definition of inverse image gives . So .
Now let's prove the oposite inclusion.
Let . By definition of inverse image we get , so, by definition of , there exists some such that .
Now we use that is injective: implies . This is an answer to your question at the end of your attempt, it is just definition of injectivity. So we have and we know that , so and we are done.
As for the surjective function, what is exactly the question?