If we take y=−1 we'll get that: f(f(−1))=(f(x)+21)(f(−1)+21). So if f(−1)=−21, then f is constant. If we substitute f=c in our equality, then we'll get that c=(c+21)2 which is impossible. Therefore f(−1)=−21.
x=0⇒f(f(y))=(f(0)+21)(f(y)+21).(1)
Substituting y=−1 in (1) we see that f(−21)=0. Now suppose that for some y0=−1 we have f(y0)=−21. Then substituting y=y0 in the given equality we will obtain: f(x(1+y0)−21)=0, which means that f is constant which was proved to be impossible. Thus f(y)=−21⇔y=−1. Now take some y=−1, and substitute in the given equality
x=y+1−21−f(y). Then 0=f(−21)=(f(y)+21)(f(y+1−21−f(y))+21). Since y=−1,f(y)+21=0, and so f(y+1−21−f(y))=−21⇒y+1−21−f(y)=−1⇒f(y)=y+21. An easy
check shows that this function meets all the requirements.