$\frac{\tan8°}{1-3\tan^2 8°}+\frac{3\tan24°}{1-3\tan^2 24°} + \frac{9\tan72°}{1-3\tan^2 72°} + \frac{27\tan216°}{1-3\tan^2 216°}=x\tan108°+y\tan8°$
$$\frac {\tan 8°}{1-3\tan^2 8°}+\frac {3\tan 24°}{1-3\tan^2 24°} + \frac{9\tan 72°}{1-3\tan^2 72°} + \frac{27\tan 216°}{1-3\tan^2 216°} =x\tan108°+y\tan8°$$
Now, $$\frac {\tan 8°}{1-3\tan^2 8°}=\frac{1}{8}\left(\frac {8 \tan 8°}{(1-3\tan^2 8°)}+\tan 8°-\tan8° \right) \\ =\frac{1}{8}\left(-\tan8° \right)+\frac{1}{8}\left(\frac {8 \tan 8°}{(1-3\tan^2 8°)}+\tan 8° \right) \\ =\frac{1}{8}\left(-\tan8° \right)+\frac{3}{8}(\tan 24°)$$
Solving in this way, we get the LHS as $$\frac{81}{8}\tan(108^\circ)-\frac{1}{8}\tan(8^\circ)$$
From this, we get $$x+y=10$$
Hint
$$f(p)=\dfrac{\tan p}{1-3\tan^2p}+z\tan p=\dfrac{(1+z)\tan p-3z\tan^3p}{1-3\tan^2p}$$
Now comparing with $\tan3p=?$ formula,
we need $$\dfrac{1+z}{3z}=\dfrac31 \iff z=\dfrac18$$
$$\implies f(p)=\dfrac{3\tan3p}8$$
Put $p=8,24,72,216^\circ$ to find the LHS to be
$$-\dfrac{\tan8^\circ}8+\dfrac{3^4\tan648^\circ}8$$
Finally $648\equiv108\pmod{180}$