Explanation
For set A: $\log_{\frac{2}{\pi}} |\sin x| + \log_{\frac{2}{\pi}} |\cos x| = 2$ $\Rightarrow \log_{\frac{2}{\pi}} |\sin x \cdot \cos x| = 2$ $\Rightarrow |\sin x \cos x| = (\frac{2}{\pi})^2$ $\Rightarrow |\frac{1}{2} \sin 2x| = \frac{4}{\pi^2}$ $\Rightarrow |\sin 2x| = \frac{8}{\pi^2}$ Since $0 < \frac{8}{\pi^2} < 1$, there are 4 solutions for $x \in (0, \pi)$. For set B: Case 1: $x < 2$, $x(x-4) + 3(x-2) + 6 = 0$ $\Rightarrow x^2 - 4x + 3x - 6 + 6 = 0$ $\Rightarrow x^2 - x = 0$ $\Rightarrow x(x-1) = 0$, so $x = 0, 1$. Case 2: $x > 2$, $x(x-4) - 3(x-2) + 6 = 0$ $\Rightarrow x^2 - 4x - 3x + 6 + 6 = 0$ $\Rightarrow x^2 - 7x + 12 = 0$ $\Rightarrow (x-3)(x-4) = 0$, so $x = 3, 4$. Thus, $B = {0, 1, 3, 4}$, so $n(B) = 4$. Since $A$ and $B$ are disjoint, $n(A \cup B) = n(A) + n(B) = 4 + 4 = 8$.