Solution by maromex.
Let P(x,y) be the given assertion f(f(x2)+f(y2))=x2+f(y2).
Comparing P(x,y) and P(y,x), we get x2+f(y2)=y2+f(x2). So
f(x2)=x2+C
for some real constant C. Plugging this into the given equation we get
f(x2+y2+2C)=x2+y2+C.
Note that f(x)=x+C for all x≥0. There exist sufficiently large x and y such that x2+y2+2C≥0, and x2+y2+3C=x2+y2+C for all such large x and y. This means C=0, and therefore f(x2)=x2. Plugging this into the given equation, we get
f(x2+y2)=x2+y2.
As f(x)=x for all x≥0, and x2+y2≥0, this is true. So all f that work are characterized by the form
f(x)={xg(x)x≥0x<0
where g:(−∞,0)→R is an arbitrary function.