You can reduce to the case of polynomials, because if $f(x,y)=\frac{f_1(x,y)}{f_2(x,y)}, g(x,y)=\frac{g_1(x,y)}{g_2(x,y)}$ where $f_i,g_i$ are polynomials, then we can show that $$f(x+y,xy)=g(x+y,xy)$$ if and only if $$f_1(x+y,xy)g_2(x+y,xy)=f_2(x+y,xy)g_1(x+y,xy).$$
Lemma: (If $f(x,y),g(x,y)\in\mathbb Q[x,y]$ and for every $r_1,r_2\in\mathbb Q$ has $f(r_1,r_2)=g(r_1,r_2),$ then $f(x,y)=g(x,y).$
See later for proof.
Now, if $f(x+y,xy)=g(x+y,xy)$ then for every complex values $x_1,y_1$ you have $f(x_1+y_1,x_1y_1)=g(x_1+y_1,x_1y_1).$
Now, for $r_1,r_2\in\mathbb Q,$ let $x_1,y_1$ be the two roots if $x^2-r_1x+r_2=0.$ Then $f(r_1,r_2)=f(x_1+y_1,x_1y_1)=g(x_1+y_1,x_1y_1)=g(r_1,r_2).$
So by the Lemma, if $f(x+y,xy)=g(x+y,xy)$ then $f(x,y)=g(x,y).$
The underlying argument is that $\mathbb C\times\mathbb C, (z_1,z_2)\mapsto (z_1+z_2,z_1z_2)$ is onto, so if $(f-g)(z_1z_2,z_1+z_2)=0$ is true for all $z_1,z_2\in\mathbb C$ then $(f-g)(z_1,z_2)=0$ for all $z_1,z_2\in\mathbb C.$
The equivalent map $\mathbb Q\times\mathbb Q\to\mathbb Q\times \mathbb Q.$ is not onto. But evaluation of rational polynomials can be done for any values in any commutative ring containing the rationals, such as $\mathbb C.$
Proof for Lemma. Let $h(x,y)=f(x,y)-g(x,y)$ and write:
$$h(x,y)=\sum_{i=0}^{n} h_i(x)y^i$$ where each $h_i(x)\in\mathbb Q[x]$ and $h_n(x)\neq 0.$ (We can do so if $f(x,y)\neq g(x,y).$)
For only finitely many $r\in\mathbb Q,$ we have $h_n(r)=0,$ so we can find an $r_1\mathbb Q$ so that $h_n(r_1)\neq 0.$
The $p(y)=h(r_1,y)=\sum_{i=0}^{n}h_n(r_1)y^i\in\mathbb Q[y],$ and $p(y)\neq 0,$ so there must be a $r_2\in\mathbb Q$ so that $h(r_1,r_2)=p(r_2)\neq 0.$
But then $f(r_1,r_2)-g(r_1,r_2)=h(r_1,r_2)\neq 0,$ so $f(r_1,r_2)\neq g(r_1,r_2).$ Thus contradicting our assumption.