Solution 1. We first show that f(f(x)) must be affine. To see this, replace (a,b) first by (a−1,a+1) and then by (a,a) to obtain
f(f(a−1))+f(f(a+1))=f(2a)=2f(f(a)).
Therefore,
f(f(a+1))−f(f(a))=f(f(a))−f(f(a−1)).
This means that there is a constant m so that for all a∈Z:
f(f(a+1))−f(f(a))=m.
Inductively it follows that for all a∈Z
f(f(a))=ma+c.
Then, taking the original functional equation with b=0.
f(a+0)=f(f(a))+f(f(0))=ma+2c.
Taking the full original function equation, then we have:
m(a+b)+2c=f(a+b)=f(f(a))+f(f(b))=f(ma+2c)+f(mb+2c)=m(ma+2c)+2c+m(mb+2c)+2c=m2(a+b)+2c(2m+2).
As this holds for arbitrary a+b we must have:
m0=m2=(2m+1)c.
The first equation implies either m=0 or m=1, so 2m+1=0 and the second equation then implies c=0. Putting these together, we see that either f(a)=0 for all a∈Z or f(a)=a for all a∈Z and the possible values of f(2020) are 0 or 2020.
Solution 2. Let fn denote the n-th iterate of f, i.e. f2(x)=f(f(x)), f3(x)=f(f(f(x))) etc. The given equation can then be written as
f(a+b)=f2(a)+f2(b).
Using a=f(0) and b=0, we get f2(0)=f3(0)+f2(0), which implies
f3(0)=0.
Let a=b=0 to get f(0)=2f2(0). Let now a=b=f2(0) and use the two previous identities to see that
f2(0)=f(f(0))=f(2f2(0))=2f4(0)=2f(f3(0))=2f(0)=4f2(0).
This implies f2(0)=0. Letting b=0 in the original equation, we now obtain f2(a)=f(a) for all a∈Z. This means that the given equation is equivalent to Cauchy's equation
f(a+b)=f(a)+f(b)
whose solutions over the integers are known to be of the form f(a)=ca for some integer c. From f2(1)=f(1) we obtain c2=c, i.e. c=0 or c=1. Therefore, the possible values of f(2020) are 0 or 2020.