A full score of 20 points) Let $x, y$ be non-zero real numbers, and satisfy $\frac{x \sin \frac{\pi}{5}+y \cos \frac{\pi}{5}}{x \cos \frac{\pi}{5}-y \sin \frac{\pi}{5}}=\tan \frac{9 \pi}{20}$.
(1) Find the value of $\frac{y}{x}$; (2) In $\triangle A B C$, if $\tan C=\frac{y}{x}$, find the maximum value of $\sin 2 A+2 \cos B$.
Solution: (1) From the given, we have $\frac{\tan \frac{\pi}{5}+\frac{y}{x}}{1-\frac{y}{x} \tan \frac{\pi}{5}}=\tan \frac{9 \pi}{20}$.
Let $\frac{y}{x}=\tan \theta$, then $\frac{\tan \frac{\pi}{5}+\tan \theta}{1-\tan \theta \tan \frac{\pi}{5}}=\tan \frac{9 \pi}{20}$, which means $\tan \left(\theta+\frac{\pi}{5}\right)=\tan \frac{9 \pi}{20}$.
5 points
Therefore, $\theta+\frac{\pi}{5}=k \pi+\frac{9 \pi}{20}$, which means $\theta=k \pi+\frac{\pi}{4}(k \in \mathbb{Z})$.
Thus, $\frac{y}{x}=\tan \theta=\tan \left(k \pi+\frac{\pi}{4}\right)=\tan \frac{\pi}{4}=1$.
10 points
(2) From (1), we get $\tan C=1$.
Since $0<C<\pi$, we have $C=\frac{\pi}{4}$. Therefore, $A+B=\frac{3 \pi}{4}$, so $2 A=\frac{3 \pi}{2}-2 B$.
15 points

Thus, $\sin 2 A+2 \cos B=\sin \left(\frac{3 \pi}{2}-2 B\right)+2 \cos B$
$$
\begin{array}{l}
=-\cos 2 B+2 \cos B=-2 \cos ^{2} B+2 \cos B+1 \\
=-2\left(\cos B-\frac{1}{2}\right)^{2}+\frac{3}{2} .
\end{array}
$$

Therefore, when $\cos B=\frac{1}{2}$, i.e., $B=\frac{\pi}{3}$, $\sin 2 A+2 \cos B$ reaches its maximum value of $\frac{3}{2}$.
20 points