For any real number z, we set a=f(z),b=z+f(0),n=f(2a+b), and m=f(0)−2a+b. Since Df=R, a,b,n, and m are well-defined. Substituting x=0, y=z into (∗) yields f(z+f(0))=f(f(z)), so f(a)=f(b) (I).
Substituting x=m and y=a or y=b into (∗) yields {f(f(m)+a)=2m+f(f(a)−m)f(f(m)+b)=2m+f(f(b)−m), which, due to (I), can be summarized as f(f(m)+a)=f(f(m)+b) (II).
Substituting x=a or x=b and y=n into (∗) yields {f(f(a)+n)=2a+f(f(n)−a)f(f(b)+n)=2b+f(f(n)−b), which, due to (I), can be summarized as 2a+f(f(n)−a)=2b+f(f(n)−b) (III). Substituting x=2a+b,y=0 into (∗) yields f(f(2a+b))=a+b+f(f(0)−2a+b), so f(n)=a+b+f(m) or, in other words, f(n)−a=f(m)+b and f(n)−b=f(m)+a. This, combined with (III), immediately gives 2a+f(f(m)+b)=2b+f(f(m)+a), from which, with (II), we conclude a=b, so f(z)=z+f(0). This shows that any function f that satisfies (∗) must have the form f(x)=x+c(c= const. ). Substituting into (∗) confirms that any f of this form indeed satisfies the given equation: f(f(x)+y)=x+y+2c=2x+f(f(y)−x).
Note: Additional properties of f, such as injectivity, monotonicity, or differentiability, should not be assumed but must be proven.