You say "The answer says there does not exist a function $h(x)\in R$ such that $h(x)=1$, which I don't understand why, since the only condition in $R$ is $g(1)=0$."
I deduce that you must be misquoting the answer - you do understand why the function $h(x)=1$ is not in $R$, since $h(1)\ne0$.
I bet the answer actually says this: ($*$)"There does not exist $h\in R$ such that $h(x)=1$ for all $x\ne1$."
I believe that that's what it says because that makes much more sense as an answer, and also because I can believe it's possible for you not to understand that! If in fact the only condition on $g\in R$ was $g(1)=0$ then ($*$) would be false, which would explain why you couldn't understand it. But $g(1)=0$ is not the only condition on $g\in R$! The functions in $R$ are also required to be continuous.
And that's why ($*$) is true: If $h(x)=1$ for all $x\ne0$ and also $h$ is continuous, then $h(1)=1$, so $h\ne R$.
(See Henning Malcolm's answer for an explanation of why this means $R$ does not have an identity - I've ignored the actual question here, trying instead to explain what I suspect you're missing, as requested.)