I have proved this but my teacher wants me to put more but I have no idea what to add. He says he wants a proof that they are explicitly in fact a bijection.
For the first one this is what I did $g(x)=x$ if $x$ is not contained in $A$ Otherwise $g(x) = f(x)$ Then, $g$ is a required bijection from $(0,1]$ to $(0,1)$
For the second one I said $$A=\{0,1,\frac{1}{2},\frac{1}{3},\frac{1}{4}, \dots, \frac{1}{n-2}\}$$ $$B=\{\frac{1}{2},\frac{1}{3},\frac{1}{4}, \dots, \frac{1}{n}\}$$ $$A \to B$$ such that $$f\left(\frac{1}{n-2}\right) \to \frac{1}{n}$$