Given, 2+f(x)f(y)=f(x)+f(y)+f(xy)
or 1−f(x)−f(y)+f(x)f(y)=f(xy)−1
or (1−f(x))(1−f(y))=f(xy)−1
The above result holds if and only if,
f(x)=1+xn
if f(x)=anxn+an−1xn−1+...+a0
Then, consider (1+f(x))(1−f(y))=f(xy)−1
Compare constant term on either side, we have
1−a0=a0−1⇒a0=1
Comparing coefficient of xnyn, we get
a2n=an⇒an=1 or otherwise polynomial would not be of n degree.
Comparing coefficient of x,x1,....,xn−1 on either sides, we have
a1=a2=...=an−1=0
⇒an=1 and f(x)=xn+1
Given, f(2)=5 ie, 2n+1=5
⇒n=2
Thus, f(x)=x2+1
f(f(2))=f(5)=52+1=26