If a function is like $f(f(y))=a^2+y$, does it imply that $f$ is surjective?
Just for an example, consider this:
Find all functions $f:\mathbb{R}\mapsto \mathbb{R}$ such that $$f(xf(x)+f(y))=(f(x))^2+y$$ for all real values of $x,y$. It's solution begins as follows: Let $f(0)=a$. Setting $x=0$ we get $$f(f(y))=a^2+y ~ \forall y\in \mathbb{R}$$
Now we can say that the range of $a^2+y$ is all real numbers, so $f$ is surjective.
What if $f\in (a,b)$ where $(a,b)$ is some smaller interval?
If $f:\mathbb{R}\to\mathbb{R}$, the answer is yes. In fact, let $v\in\mathbb{R}$ and consider $y=v-f(0)^2$. Note that $f(f(y))=v$ and we obtain that exist $x=f(y)\in\mathbb{R}$ such that $f(x)=v$