The command
Plot[Log[27, Sin[2*x] - 1/3*Cos[x]] - 1/3*Log[3, -Cos[x]], {x, -Pi, Pi}]
performs
However, this result contradicts both calculus over the reals, where $\log_3(-\cos x)$ is not defined for $x\ge-\frac \pi 2, x\le 0,$$x\ge-\frac \pi 2, x\le \frac \pi 2,$ and the result of
Solve[Log[27, Sin[2*x] - 1/3*Cos[x]] - 1/3*Log[3, -Cos[x]] == 0 &&
x >= -Pi && x < Pi, x, Reals]
{{x -> -2 ArcTan[3 + 2 Sqrt[2]]}}
The question arises: how to fix this discordance?