LOGARITHMIC INEQUALITY - TWO HOURS Source: Brilliant 

Solve the inequality $$   \ x \log_{\log_{|x^2 - 3 | - 2 } (x^2 - 3|x| + 2) } \left( \dfrac{x^3 - |3x+2|}{x^3 - |3x-2|}\right) \geq 0$$ 

I have tried this many times, but I keep ending up with the wrong result. 
At first I thought the answer key was wrong, but I typed the equation on my TI-84 Plus calculator was agreeing with the answer key as well. I think my whole approach to solving the problem is incorrect.  
Terminology:
$$\log_{Base}(Argument)= Result $$

I want to know the general solution to this in order to solve my problem:
Now finding the general solution to this:
$$  f(x) \log_{\log_{g(x) } (h(x)) } \left( \dfrac{a(x)}{b(x)}\right)\geq 0 $$
$$Case 1:$$
Given the first function: $$f(x)\geq0$$
As the product of two postive functions is positive, it must also be that :
$$\log_{\log_{g(x) } (h(x)) } \left( \dfrac{a(x)}{b(x)}\right)\geq 0 $$
For the whole expression to be positive. 
In order for the logarithmic function (with a variable base) to be positive, we must consider two subcases. The reason for the these two subcases is due to the change in behavior of the logarithmic function in two different regions of the base.
Case 1.1:$$ \log_{g(x) } (h(x))  \in {(0,1)} \cap \left( \dfrac{a(x)}{b(x)}\right) \in {(0,1]}  $$
To solve Case 1.1 this we must to consider 4 inequalities:
1. $$ \log_{g(x) } (h(x)) > 0$$
Case 1.11:$$ g(x) \in {(0,1)} \cap h(x) \in {(0,1)}$$
Case 1.12:$$ g(x) \in {(1,\infty)} \cap h(x) \in {(1,\infty)}$$
2. $$ \log_{g(x) } (h(x)) < 1$$
There are two ways to solve this.
i) Either we use a property of logarithms:
$$ \log_{a } (a) = 1$$
ii) Or we consider the behaviour of the logarithmic graph (with a variable base) that is less that one. 
We will use option (i) here to obtain:
$$ \log_{g(x) } (h(x)) < \log_{g(x) } (g(x))$$
Sending the RHS to LHS and using the subtraction of logs with same base property: 
$$ \log_{g(x) } (h(x)) - \log_{g(x) } (g(x))<0$$
$$ \log_{g(x) } \left( \dfrac{h(x)}{g(x)}\right) <0$$
3. $$\left( \dfrac{a(x)}{b(x)}\right)>0$$
$$(a(x)>0 \cap b(x) >0) \cup(a(x)<0 \cap b(x)<0)$$
4. $$\left( \dfrac{a(x)}{b(x)}\right)\leq1$$
Let $$a(x) - b(x) = c(x)$$
Then $$\left( \dfrac{c(x)}{b(x)}\right)\leq0$$
$$(c(x)\geq0 \cap b(x) <0) \cup(c(x)leq0 \cap b(x)>0)$$
Case 1.2:$$ \log_{g(x) } (h(x))  \in {(1,\infty)} \cap \left( \dfrac{a(x)}{b(x)}\right) \in {[1,\infty)}  $$
To solve Case 1.2 this we must to consider 2 inequalities:
1. $$ \log_{g(x) } (h(x)) > 1$$
2. $$\left( \dfrac{a(x)}{b(x)}\right)\geq1$$
Let $$a(x) - b(x) = c(x)$$
Then $$\left( \dfrac{c(x)}{b(x)}\right)\geq0$$
$$(c(x)\geq0 \cap b(x) >0) \cup(c(x)leq0 \cap b(x)<0)$$
Solution Set:
$$ \implies x \in {(CASE 1.1) \cup (CASE1.2)\cap (CASE 1)}  $$
$$Case 2:$$
Given the first function $$f(x)\leq0$$
As the product of two negative functions is positive it must also be that: $$\log_{\log_{g(x) } (h(x)) } \left( \dfrac{a(x)}{b(x)}\right)\leq0 $$
For the whole expression to be positive. 
In order for the logarithmic function (with a variable base) to be negative, we must consider two subcases. The reason for the these two subcases is due to the change in behaviour of the logarithmic function in two different regions of the base.
Case 2.1:$$ \log_{g(x) } (h(x)) \in {(0,1)} \cap \left( \dfrac{a(x)}{b(x)}\right) \in {[1,\infty)}  $$
To solve this we must to consider:
$$ \log_{g(x) } (h(x)) > 0$$
$ \g(x) \in {(0,1)} \cap h(x) \in {(0,1)}$
$ \g(x) \in {(1,\infty)} \cap h(x) \in {(1,\infty}$
$$ \log_{g(x) } (h(x)) < 1$$
$$\left( \dfrac{a(x)}{b(x)}\right)\geq1$$
Case 2.2:$$ \log_{g(x) } (h(x)) \in {(1,\infty)} \cap \left( \dfrac{a(x)}{b(x)}\right) \in {(0,1]}  $$
To solve this we must to consider:
$$ \log_{g(x) } (h(x)) > 1$$
$$\left( \dfrac{a(x)}{b(x)}\right)>0$$
$$\left( \dfrac{a(x)}{b(x)}\right)\leq1$$
Solution Set:
$$ \implies x \in {(CASE 2.1) \cup (CASE 2.2)}\cap (CASE2)  $$

One of my hurdles in this problem is the depressed cubic and the 4 modulus functions:
In two cases of the modulus function in the argument of the logarithm, the cubic has 3 trivial real roots. To obtain the real roots case I used trigonometric substitution. In the other two cases The roots were complex and non trivial and for the complex roots I used Vieta's Substitution. (Cardanos method)
What I'm have trouble with is the conditions and relationships that must hold to make the logarithm be non-negative. 
Also how to tell if a cubic has imaginary or real roots. 
Any help would be greatly appreciated thank you!!
Extra
[How to solve this logarithm inequality with absolute value as its base? In this link, if you scroll down, you will see I have solved it. 
 A: Let us rewrite the equation to $$x\log_{r(x)} s(x) \geq 0$$ where $$r(x)=\log_{|x^2-3|-2} (x^2-3|x|+2)$$and $$s(x)=\frac{x^3-|3x+2|}{x^3-|3x-2|}$$
For the above function to be non-negative we have following cases 
1)$x>0$ and $0<r(x)<1$ and $0<s(x)<1$
2)$x>0$ and $r(x)>1$ and $1<s(x)<\infty$
3)$x<0$ and $0<r(x)<1$ and $1<s(x)<\infty$
4)$x<0$ and $r(x)>1$ and $0<s(x)<1$
5)$x=0$
6)$s(x)=1$
Now some algebra 
Consider solving

1)  $0<r(x)<1$ when 
a)$x>0$
$$0<\log_{|x^2-3|-2} (x^2-3x+2)<1$$ or $$1<x^2-3x+2<|x^2-3|-2$$Now consider two sub cases of this $$x^2-3x+1>0$$ and $$x^2-3x+2<|x^2-3|-2$$
If coefficent of $x^2$ of a parabola is positive then it opens upwards else downward. 
For first Notice it is an upward parabola roots are $\frac{3+\sqrt{5}}{2}$ and $\frac{3-\sqrt{5}}{2}$.So solution is $x \in (0,\frac{3-\sqrt{5}}{2}) \cup (\frac{3+\sqrt{5}}{2},\infty)$

Now consider second .Firstly when $x<\sqrt3$ given equation becomes $$x^2-3x+2<-x^2+1$$ or $$2x^2-3x+1<0$$ this is also a upward parabola.roots $1/2,1$.So solution $x\in (1/2,1)$

Next consider $x \geq \sqrt3$ inequality becomes $x>7/3$.So solution $x \in (7/3,\infty)$Union of above two sub cases $x\in (1/2,1) \cup (7/3,\infty)$
For overall case 1.a) to be satisfied the solution is $$x\in(\frac{3+\sqrt5}{2},\infty)$$

Next case 2.$$0<s(x)<1$$,$$x>0$$
or $$0<\frac{x^3-|3x+2|}{x^3-|3x-2|}<1$$.For $s(x)$ to be defined $x \neq 1$ or $$0<x^3-|3x+2|<x^3-|3x-2|$$ For first inequality it is easy to find out $x \in (2,\infty)$.(For this consider the graph of $y=x^3$ and $y=|3x+2|$. Since $x^3$  is monotically increasing and intersection the other line in $2$)Here is a graph quite easy to draw manually

The second inequality is true $\forall x›0$Combined solution $x \in (2,\infty)$

Combining the above we have one solution as $$x\in(\frac{3+\sqrt5}{2},\infty)$$
By continuing like this we can get all solutions.
