We know that, cos−1x is defined when −1⩽x⩽1
So, cos−1(x2−9x2−5x+6) is defined when
−1⩽x2−9x2−5x+6⩽1 and x2−9=0
⇒−1≤(x−3)(x+3)(x−3)(x−2)≤1 and x=±3
⇒−1≤x+3x−2≤1 and x=±3, ⇒−1≤x+3x+3−5≤1 and x=±3
⇒−1≤1−x+35≤1 and x=±3,
⇒−2≤−x+35⩽0 and x=±3
⇒0≤x+35⩽2 and x=±3, ⇒x+3≥25 and x=±3
⇒x≥2−1 and x=±3
∴x∈[2−1,∞)−3⋯(1)
Now, we know that log(x) is defined for x>0.
So, log(x2−3x+2) is defined for x2−3x+2>0, ⇒(x−1)(x−2)>0
⇒x>2 or x<1⋯(2)
from equations (1) & (2)

∴x∈[−21,1)∪(2,∞)−3