\frac{\sin\theta}{\sin\varphi}=\frac{y}{b}=\frac{x}{a}\quad\Rightarrow\quad\frac{a}{b}=\frac{x}{y}