We prove that the only function satisfying the two conditions is f(x)=x.
We prove that f is an injection. If we put y=0 in (i) we get f(f(x2)+f(0))=x2+2f(0), for any x, or equivalently,
f(f(a)+f(0))=a+2f(0)(1)
for any number a≥0. From (1), f is an injection on the set of all nonnegative numbers. We fix now y. From the conditions (i) and (ii) we get that f(⋅) is a superior unbounded function. If f(y1)=f(y2) then f(f(x2)+y1+f(y1))=f(f(x2)+y2+f(y2)). For large enough values of x the expressions f(x2)+y1+f(y1) and f(x2)+y2+f(y2) are positive and thus y1=y2.
We prove now that f(0)=0.
Case 1. f(0)≤0. For a=−2f(0), we have f(f(−2f(a))+f(0))=0. Thus, there exists a real number c such that f(c)=0.
Plugging x=0 and y=c in (i) we get f(f(0)+c)=0. As f is an injection, we get f(0)+c=c, that is f(0)=0.
Case 2. f(0)≥0. In (i) we put x=y=0: f(2f(0))=2f(0). We plug now a=3f(0)=f(0)+f(2f(0)).
From (1) we have f(a)=f(f(2f(0))+f(0))=2f(0)+2f(0)=4f(0). We add now f(0) and we get f(f(a)+f(0))=f(5f(0))=3f(0)+2f(0)=5f(0).
By plugging now x=0 and y=2f(0) in (i) we get f(5f(0))=4f(0). Thus f(5f(0))=5f(0)=4f(0), from were we obtain f(0)=0.
From (1), for a≥0 we have f(f(a))=a, and from (i), for x=0, we have f(y+f(y))=2f(y) for any real number y.
We plug now y=f(a): f(f(a)+a)=2f(f(a))=2a and y=a: f(a+f(a))=2f(a). We obtained that for any a≥0 we have f(a)=a.
Then, (i) becomes f(x2+y+f(y))=x2+2f(y). We fix now any real y. There exists a x∈R such that x2+y+f(y)>0. Then f(x2+y+f(y))=x2+y+f(y)=x2+2f(y) and thus f(y)=y.