Consider the function $f:\mathbb{N}\to\mathbb{N}$ given by $f(x)=2x$.
1) Find the function $g:\mathbb{N}\to\mathbb{N}$ with the property that $$g(f(x))=x$$ for all $x$ from $\mathbb{N}$.
2) Prove that there is no function $h:\mathbb{N}\to\mathbb{N}$ with the property that $$f(h(x))=x$$ for all natural $x$.
Part $(1)$: You can choose $$g(x)=\begin{cases}\frac{x}{2}\quad\text{$x$ is even}\\0\quad\text{otherwise}\end{cases}$$ Note that $g$ maps numbers to $\mathbb{N}$.
Part $(2)$: Since the domain of $f$ is $\mathbb{N}$ and $f(x)$ is even for all $x\in\mathbb{N}$, you can't have $$f(h(x))=x$$ for odd $x$.