How to find the value of a function where a relation is given If $g(x)$ is a polynomial satisfying
$$g(x)g(y)=g(x)+g(y)+g(xy)-2$$
For all real value of $x$ and $y$. And 
$$ g(2)=5$$
then find 
$$g(3)=?$$

We have that $\big(g(x)-1\big)\big(g(y)-1\big)=g(xy)-1$.
Set $f(x)=g(x)-1$, then 
$$
f(xy)=f(x)f(y)\tag{1}
$$
Also, $f(x)\ge 0$, for all $x>0$, as $f(x)=(f(\sqrt{x}))^2$
Thus $f(x^n)=(f(x))^n$, as as $f(x)\ge 0$, then $(f(x^{1/n}))^n=f(x)\to f(x^{1/n})=(f(x))^{1/n}$. Altogether $f(x^{m/n})=(f(x))^{m/n}$, and as $f$ is continuous 
$f(x^{a})=(f(x))^{a}$, for all $x>0$ and $a\in\mathbb R$.
If $g(2)=5$, then $f(2)=1=4$, and 
$$
g(3)=f(3)+1=f(2^{\log_2 3 })+1=\big(f(2)\big)^{\log_2 3 }+1=4^{\log_2 3 }+1=2^{2\log_2 3}=9+1=10.
$$
Note. Alternatively, $(1)$ implies that $f(x)=x^n$, for some $n\in\mathbb N$, as $f$ is a polynomial. To do that first observe that if $f(x)=0$, then $x=0$, and hence $f(x)=ax^n$. Next, observe that $a>0$, and $f(2)=4$, and as $f(x)f(x)=f(x^2)$, then $a=1$. Thus $f(x)=x^n$. Finally, $f(2)=4$ implies that $n=2$ and that
$$
f(x)=x^2.
$$
