Distinct Roots of $x^2+(a-5)x+1=3|x|$ Problem:

$$x^2+(a-5)x+1=3|x|$$ Find 3 distinct solutions to the above problem.

A friend of mine at my coaching center came up with this problem which nobody was able to solve. Unfortunately, I have been unable to contact my professor and understand how to solve this problem. Despite thinking for a long time, I could not come up with anything.
The only things that struck me was that I should open up the modulus sign (first by taking $x\ge0\Rightarrow |x|=x$ and then by taking $x<0\Rightarrow |x|=-x$). 
Also, the question could perhaps then be tackled by using relations between the roots of the quadratic equations (I know only that the sum of both roots of a quadratic equation $ax^2+bx+c$ is $\dfrac{-b}{a},$ and that their product is $\dfrac{c}{a}$).
Unfortunately I could not proceed any further. I would be truly grateful if somebody would kindly show me how to solve this problem. Many, many thanks in advance!

Case when $x \geq 0$:
$x^2+(a-8)x+1=0$
Then $x=\frac{(8-a)\pm \sqrt{a^2-16a+60}}{2}$
Case when $x < 0$:
$x^2+(a-2)x+1=0$
Then $x=\frac{(2-a)\pm \sqrt{a^2-4a}}{2}$
As we're only working with real solutions: for the determinants to be non-negative, we need $a \leq 6$ or $a \geq 10$ in the former, and $a \leq 0$ or $a \geq 4$ in the latter. 
Since we want 3 roots, this means one of the determinants has to be zero while the other is positive. Only $a=6$ satisfies this: for the first case, $x=1$ (only root: the determinant is zero). In the second case, $x=-2 \pm \sqrt 3$. You must also remember to check that the proposed solutions satisfy the domain of $x$ which you have fixed; indeed $1>0$ and  $-2 \pm \sqrt 3<0$.
So the answer necessitates $a=6$, from which it follows that $x=1$, $x=-2 \pm \sqrt 3$ are your three distinct solutions.
EDIT: Sorry, there is another solution in $a=4$, whereupon your roots are $x=2 \pm \sqrt 3$ and $x = -1$.
