I just came up with a different conclusion from here.Tahmid Hasan wrote:Finally solved it!
Let $P(x,y) \Rightarrow f(x^2+y+f(y))=f(x^2)+\alpha.y$
If $\alpha=0$, then $f(x)=0,1$ both satisfy the equation, so a contradiction.
So $\alpha \neq 0$, then
$P(0,x) \Rightarrow f(x+f(x))=f(0)^2+\alpha.x$
since $f(x+f(x))-f(0)^2$ ranges over $\mathbb{R}$, so does $\alpha.x$ i.e $x$[$\alpha \in \mathbb{R}-\{0\}$]
So $f(x)$ is surjective.
Let $f(c)=0$.
$P(0,c) \Rightarrow f(c)=f(0)^2+\alpha.c \Rightarrow c=\frac{-f(0)^2}{\alpha}$.....$(1)$
$P(x,\frac{-f(x^2)}{\alpha}) \Rightarrow f(x^2-\frac{f(x)^2}{\alpha)}+f(\frac{-f(x)^2}{\alpha})=0$.....$(2)$
Let $f(c_1)=f(c_2)=0$
$P(0,c_1),P(0,c_2)$ implies $c_1=c_2$, so from $(1),(2)$ we conclude
$f(\frac{-f(x)^2}{\alpha})-f(\frac{f(x)^2}{\alpha})+x^2=-\frac{-f(0)^2}{\alpha}$.
$P(x,\frac{-f(y)^2}{\alpha}) \Rightarrow f(x^2-\frac{f(0)^2}{\alpha}-y^2)=f(x^2)-f(y)^2$. Let it be $P(x,y)$
If $\alpha >0$, plug $P'(\frac{f(0)}{\sqrt \alpha})$. If $\alpha <0$, plug $P'(\frac{f(0)}{\sqrt{- \alpha}},x)$
both will yield $f(\frac{f(0)^2}{\alpha})=0$
So $\frac{f(0)^2}{\alpha}=\frac{-f(0)^2}{\alpha} \Rightarrow f(0)=0$.
So $P(x,0) \Rightarrow f(x^2)=f(x)^2$.....$(3)$
So $P'(x,y) \Rightarrow f(x^2-y^2)=f(x^2)-f(y^2)$ which implies $f(x-y)=f(x)-f(y) \forall x \ge 0,y \ge 0$. Let it be $Q(x,y)$
$Q(x+y,y) \Rightarrow f(x+y)=f(x)+f(y) \forall x \ge 0,y \ge 0$. Let it be $R(x,y)$
Now $\forall x<0,f(-x)=f(0-x)=f(0)-f(x)=-f(x)$.
Let $y<0$, then $R(x,-y) \Rightarrow f(x-y)=f(x)-f(y)$
So $f(x-y)=f(x)-f(y) \forall x \ge 0, y \in \mathbb{R}$.
Then $Q(x,-y) \Rightarrow f(x+y)=f(x)+f(y)$
So $f(x+y)=f(x)+f(y) \forall x \ge 0,y \in \mathbb{R}$.
Let $x<0$, then take any $y<0$, so
$f(x+y)=-f(-x-y)=-(f(-x)+f(-y))=-(-f(x)-f(y))=f(x)+f(y)$. So $f(x)$ is additive $\forall x,y \in \mathbb{R}$.
Since $f(x^2)=f(x)^2$, we conclude $f(x) \ge 0 \forall x \ge 0$.
So from this and the additive property we conclude $f(x)$ is continuous, so $f(x)=cx(c \neq 0),0$ for which the latter is a contracdiction.
$f(x^2)=f(x)^2 \Rightarrow cx^2=c^2x^2 \Rightarrow c=1$. So $f(x)=x$, which implies $\alpha=2$.