Your idea is not wrong, but it's probably not the simplest way to go.
For the first, let's start by looking at $y=0$, that gives us:
$$
f(x)g(0)=x
$$
or (if $g(0)\neq 0$):
$$
f(x)=\frac{x}{g(0)}
$$
If we look at what happens when $x=0$, we similarily get:
$$
g(y)=\frac{y}{f(0)}
$$
We can substitute both of those expressions into the equation we wanted, and get:
$$
f(x)g(y)=\frac{xy}{f(0)g(0)}
$$
That's not $x+y$.
The other one can be done in the same way.
$x=0$ and $y=0$ are curves in $\mathbb R^2$, and so is $x=y$ that you substituted, and the "trick" is just to use what happens on two different curves to obtain expressions that can be used to arrive at a contradiction, so rewriting what you had found and finding another curve you could probably have gotten through, but in these cases the arguments get a lot simpler when you consider curves where one of the variables is constant (I'm sure cases can be found where $x=0$ and $y=0$ are not good choices)