<s>[INST] Trigonometry Problems Let $x$ and $y$ be real numbers such that $\frac{\sin x}{\sin y} = 3$ and $\frac{\cos x}{\cos y} = \frac{1}{2}$. The value of $\frac{\sin 2x}{\sin 2y} + \frac{\cos 2x}{\cos 2y}$ can be expressed in the form $\frac{p}{q}$, where $p$ and $q$ are relatively prime positive integers. Find $p + q$.
My student left me with a list of questions just now (he also said that he wanted to be helped at school :P)
 [/INST] \begin{align}  \frac{\sin x}{\sin y} &= 3 \tag{1}\label{1} \\ \frac{\cos x}{\cos y} &= \frac{1}{2} \tag{2}\label{2} \end{align}
\begin{align}  \frac{\sin 2x}{\sin 2y} + \frac{\cos 2x}{\cos 2y} &=\frac{p}{q} \tag{3}\label{3} \end{align}  
Find $p+q$.
\begin{align} 
\frac{\sin 2x}{\sin 2y}
&=
\frac{2\sin x\cos x}{2\sin y\cos y}
=\frac32
\tag{4}\label{4}
\end{align}
\begin{align} 
\frac{\sin x}{\sin y} &= 
\frac{6\cos x}{\cos y} = 3
\tag{5}\label{5}
\end{align}
\begin{align} 
\frac{\sin^2 x}{\sin^2 y} &= 
\frac{36\cos^2 x}{\cos^2 y} = 9
\tag{6}\label{6}
\\
\frac{\sin^2 x+36\cos^2 x}{\sin^2 y+\cos^2 y} 
&= 9
\tag{7}\label{7}
\\
35\cos^2 x
&= 8
\\
2\cos^2 x
&= \frac{16}{35}
\tag{8}\label{8}
\\
2\cos^2 x-1
&=
\frac{16}{35}-1
\tag{9}\label{9}
\\
\cos 2x&=-\frac{19}{35}
\tag{10}\label{10}
\end{align}  
Similarly,
\begin{align} 
\frac{\sin x}{6\sin y} &= 
\frac{\cos x}{\cos y} = \frac12
\tag{11}\label{11}
\end{align}
\begin{align} 
\frac{\sin^2 x}{36\sin^2 y} &= 
\frac{\cos^2 x}{\cos^2 y} = \frac14
\tag{12}\label{12}
\\
\frac{\sin^2 x+\cos^2 x}{36\sin^2 y+\cos^2 y} 
&=  \frac14
\tag{13}\label{13}
\end{align}
\begin{align} 
35\sin^2 y+1&=4
\tag{14}\label{14}
\\
\sin^2 y&=\frac{3}{35}
\tag{15}\label{15}
\\
1-2\sin^2y&=1-\frac{6}{35}
\tag{16}\label{16}
\\
\cos2y&=\frac{29}{35}
\tag{17}\label{17}
.
\end{align}
So,
\begin{align} 
\frac{\sin 2x}{\sin 2y} + \frac{\cos 2x}{\cos 2y}
&=
\frac32-\frac{19}{29}=\frac{49}{58}=\frac{p}{q}.
\end{align}
$p+q=49+58=107$.
</s>