\[\sqrt 3 sin2x - cos2x + 4 = 3(cosx + \sqrt 3 sinx)\]\[ \Leftrightarrow \frac{{\sqrt 3 }}{2}sin2x - \frac{1}{2}cos2x + 2 = 3(\frac{1}{2}cosx + \frac{{\sqrt 3 }}{2}sinx)\]
\[ \Leftrightarrow sin(2x - \frac{\pi }{6}) + 2 = 3sin(x + \frac{\pi }{6})\]
\[ \Leftrightarrow sin{\rm{[}}2(x + \frac{\pi }{6}) - \frac{\pi }{2}{\rm{]}} + 2 = 3sin(x + \frac{\pi }{6})\]
\[ \Leftrightarrow - cos2(x + \frac{\pi }{6}) + 2 = 3sin(x + \frac{\pi }{6})\]
\[ \Leftrightarrow 2si{n^2}(x + \frac{\pi }{6}) + 1 - 3sin(x + \frac{\pi }{6}) = 0\]
\[ \Leftrightarrow sin(x + \frac{\pi }{6}) = 1 \vee sin(x + \frac{\pi }{6}) = \frac{1}{2}\]
\[ \Leftrightarrow x = \frac{\pi }{3} + k2\pi \vee x = k2\pi \vee x = \frac{{2\pi }}{3} + k2\pi (k \in Z)\]