Solve for n=0, f[f(0)]+f(0)=f(1)+f(0)=f(1)+1=2⋅0+3, so f(1)=2.
Let n=1, then f[f(1)]+f(1)=2⋅1+3=5, which means f(2)+2=5, so f(2)=3.
From this, we conjecture that f(n)=n+1.
We need to prove this by induction for all n in the set of integers Z.
For n⩾0, if n⩽k, then f(n)=n+1, so
f[f(k)]+f(k)=2k+3,f(k+1)+k+1=2k+3,
which means f(k+1)=2k+3. Therefore, for n⩾0 and n∈Z, f(n)=n+1.
Assume for some k⩽0, when n⩾k, f(n)=n+1.
We need to prove that when n=k−1, f(k−1)=k.
Let f(k−1)=a∈Z, then
f(a)=f[f(k−1)]=2(k−1)+3−f(k−1)=2k+1−a, thus f(2k+1−a)=f[f(a)]=2a+3−(2k+1−a)=3a−2k+2,f(3a−2k+2)=f[f(2k+1)−a]=2(2k+1−a)+3−f(2k+1−a)=6k+5a+3.
If 2k+1−a⩾k, by the induction hypothesis,
f(2k+1−a)=2k+2−a, which means 3a−2k+2=2k+2−a, so a=k.
If 3a+2−2k⩾k, by the induction hypothesis,
f(3a+2−2k)=3a+3−2k=6k−5a+3, so a=k.
If {2k+1−ak+1,a<k−32,, a contradiction arises.
Thus, f(k−1)=k.
In conclusion, for all n∈Z, f(n)=n+1.