Find all functions $f:\mathbb{N}\to\mathbb{N}$ such that $$f(m^{2}+f(n))=f(m)^{2}+n\text {, for all }m,n\in \mathbb N$$
I was initially unable to solve this problem, so I referred to a hint. The hint is as follows:
Let $f(1)=k$. From the given equation, we get $f(m^{2}+k)=1+f(m)^{2}$ and $1+k^{2}=f(1+k)$. Use this to prove that
$$f(f(m))^{2}-f(k)^{2}=m^{2}-1 \ \ \ \ \ \ (*)$$
Taking $m=2$, conclude that $f(k)=1 \ \ \ (*)$.
Obtain $f(f(m))=m$ for all $m\in \mathbb{N}$. Use this to prove that $$f(n+1)=f(n)+k^{2} \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ (*)$$
By induction $f(n+1)=f(1)+nk^{2}=k+nk^{2}$. Conclude that $k=1$ and hence $f(n)=n$ for all $n\in \mathbb{N}$
This solution is very unclear to me. I have marked all unclear steps with $(*)$. Please breakdown this solution and provide well explained arguments for the marked steps. Please try to use the same notation I have provided in the solution for ease of understanding. Thanks for all help :)
You've been given all of the steps, and just need to creatively figure out why they are true by playing around enough, using what was just discovered/stated.
I've given you additional hints to each $(*)$, and encourage you to think about how to make it true before reading the spoiler.
Note: There are several different ways of approaching this problem.
The key seems to be getting to $f(f(n))=n$.