Question -
Find all functions $f:\mathbb R\to\mathbb R$ such that
a) $f(xy)=f(x)f(y)$;
b) $f(x+z)=f(x)+f(z)$, for some $z$ not equal to $0$.
My try -
By taking $x=y=0$ in a) we get $f(0)=0\text{ or }1$.
I showed that case $f(0)=1$ is not possible. Then I have to show that in case $f(0)=0$ we have either $f(x)=0$ or $f(x)=x$, which I am not able to figure out.
First note that $f(y(x+z))=f(y)[f(x)+f(z)]=f(xy)+f(yz)$ which gives $f(t+yz)=f(t)+f(yz)$. This shows that b) actually holds for all $z$.
$f(1)^{2}=f(1)$ so $f(1)=0$ or $1$. If $f(1)=0$ then $f(x) =f((1)(x))-f(1)f(x)=0$ for all $x$ . Now assume $f(1)=1$. By induction and b) show that $f(n)=n$ for all $n \in \mathbb N$. Next note that $f(nx)=n(f(x))$ by b). Hence $m f(\frac n m)=f(n)$ which gives $f(r)=r$ for all positive rational numbers $r$. Also $f(0)=0$ and $f(-x)=-f(x)$ by b) so $f(r)=r$ for all rational numbers $r$.
Next note that $f(x^{2})=[f(x)]^{2} \geq 0$. It follows that $f(y) \geq 0$ for all $y \geq 0$. This gives $f(x+z) =f(x)+f(z) \geq f(x)$ if $z \geq 0$. Equivalently, $f$ is monotonically increasing. I will leave it to you to verify that $f(r)=r$ for all $r$ rational and $f$ monotonically increasing imply that $f(x)=x$ for all $x$.