Answer: f(k)=k+2.
Substitute x=0 and y=0⇒
f(f(2y))=f(2y)+2,(1)
f(x+f(x))=f(2x)+2,(2)
Let us prove by induction, that f(2n)=2n+2. Base n=0 is already proved. Let us suppose that we have f(2n)=2n+2 and prove that f(2n+2)=2n+4.
For n=2m we have to show that f(4m+2)=4m+4. Substitute x=2m in (2): we'll get
f(2m+f(2m))=f(2m+2m+2)=f(4m+2)=f(4m)+2=4m+4.
For n=2m−1 f(4m)=4m+2. Substitute y=2m−1 in (1):
f(f(4m−2))=f(4m)=f(4m−2)+2=4m+2.
Following the same lines, we can prove that f(2n)=2n+2 for negative n. Let k be an odd number, then substitute x=2z+k, y=−z, z∈Z, we get
f(2z+k+f(k))=f(4z+2k)+f(−2)=4z+2k+2−2z+2=2z+2k+4,(3)
We consider the following two cases: f(k) is even. Substitute to (3): z=−2f(k), then f(k)=−f(k)+2k+4, therefore f(k)=k+2 is odd and we get a contradiction. f(k) is odd. Then 2z+k+f(k) is even and f(2z+k+f(k))=2z+k+f(k)+2. Recalling (3), we have f(2z+k+f(k))=2z+k+f(k)+2=2z+2k+4, and, finally, f(k)=k+2, k∈Z.