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$.