Solution by jasperE3.
Let P(x,y) denote the assertion
f(f(x)+f(y)2)=x+f(y2).
First, f is injective. Indeed, if f(u)=f(v), comparing P(u,y) and P(v,y) gives u=v. Let a=f(0). From P(t−a,0),
f(f(t−a)+a2)=t,
so f is also surjective.
Now P(0,y) gives
f(a+f(y)2)=f(y2),
and injectivity yields
a+f(y)2=y2.
Putting y=0 gives a+a2=0. If a=−1, then f(y)2=y2+1 for all y, contradicting surjectivity since 0 is not in the image. Hence a=0.
Therefore f(f(x))=x and f(y)2=y2 for all x,y. Substituting x↦f(x) into the original equation gives
f(x+y2)=f(x)+f(y2).
So f(x+t)=f(x)+f(t) for every t≥0. Taking x=−t gives f(−t)=−f(t), and the same identity then extends to all real increments; hence f is additive on R.
Since f(x)2=x2, each value satisfies f(x)=x or f(x)=−x. Additivity forces the sign to be constant on the positive reals, so
f(x)=x for all xorf(x)=−x for all x.
Both functions are checked directly to work.