It might be a very trivial question to ask but why do we get four different solutions for a quadratic equation using these two methods?
$x^2-2x-8=0$
We see that factors are $(x-4)$ and $(x+2)$ so we get $x=4$ or $- 2$.
Now when we factorise in the following way we get different answers:
$x^2-2x=8$
$x(x-2)=8$ [How can this be!?]
And we get $x=8$ or $x=10$ [How!?]
I am very confused.
Your mistake is to assume that for $a,b,c\in\mathbb{R}$, $$ab=c\quad\implies\quad a=c\quad\text{or}\quad b=c.\tag{1}$$ This is not true in general.
For example $2\times\frac{1}{2}=1$, but neither $2=1$ nor $\frac{1}{2}=1$.
Further explanations: However, $(1)$ is true when $c=0$, and this is why when finding the roots of a polynomial we can factor it and use the argument $$(x-\alpha)(x-\beta)=0\quad\implies\quad x=\alpha\quad\text{or}\quad x=\beta.$$ To prove that if $ab=0$ then $a=0$ or $b=0$, you can argue by contradiction. If both $a\neq 0$ and $b\neq 0$, then surely $ab\neq 0$.