The question is Find all functions $f:\mathbb R \to\mathbb R$ such that
$$f(x+y)f(x-y)=\big(f(x)+f(y)\big)^2-4x^2f(y)$$
Taking $x=y=0$, we get $f(0)^2=4f(0)^2 \implies f(0)=0$. Now take $x=y$ which immediately gives
$$4f(x)^2=4x^2f(x)\\
\implies f(x)(f(x)-x^2)=0\\
\implies f(x)=0 \text{ or } f(x)=x^2 \ \forall x \in \mathbb R$$ This was my solution. But I was stunned when I looked at the official solution.

Why do we need to continue to do anything after getting what I got, isn't it sufficient?
Solve $\sqrt{x - 1} = \sqrt{2x}$ for real $x$.
Square both sides. $x-1 = 2x$ so $x = -1$.
Done, right?
No! You have to verify that it actually satisfies the original.
In your case, the functional equation implies that $f(x) = 0$ or $f(x) = x^2$ for each $x$. For some $x$ it could be $0$, for some others it could be $x^2$.
So this actually describes an uncountable set of functions! Pick some subset of $\mathbb{R}$ where it is $0$. At the rest it is $x^2$. This subset could be arbitrary.
You now need to verify which of the uncountable functions actually satisfy the original equation.
That is the interesting part of the question...