<s>[INST] In a triangle $\triangle ABC$, the sum of two sides is $x$, and their product is $y$. If $x^2-c^2=y$, find $\frac{r}{R}$ in terms of $x, c, y$ This problem comes from a previous JEE Advanced examination, the problem is as follows:

In a triangle $\triangle ABC$, the sum of two sides is $x$, and their product is $y$. If $x^2-c^2=y$ where $c$ is the third side, find the ratio of the inradius to the circumradius in terms of $x, c, y$

This is indeed a pretty challenging and tricky problem. Upon initial examination, spamming algebra seems to not lead anywhere. I found a solution using some angle chasing, which I'll share below, please share your own approaches as well!
Let $a+b=x$ and $ab=y$
We know that:
$$x^2-c^2=y$$
$$(a+b)^2-c^2=ab$$
$$a^2+b^2-c^2=-ab$$
Dividing by $2ab$ and exploiting the Law of Cosines, we can say that:
$$\frac{a^2+b^2-c^2}{2ab}=-\frac{1}{2}$$
Now, this implies that $\angle C=120^\circ$
Now, using the Law of Sines, we get:
$$\frac{1}{2R}=\frac{\sin{C}}{c}$$
$$\frac{c}{2R}=\frac{\sqrt3}{2}$$
$$R=\frac{c}{\sqrt3}$$
We also know that:
$$\Delta= \frac{1}{2}ab\sin{C}$$
$$\Delta=\frac{\sqrt{3}y}{4}$$
Further, we can note that:
$$s=\frac{a+b+c}{2}$$
$$s=\frac{x+c}{2}$$
Also, $r=\frac{\Delta}{s}$, therefore:
$$\frac{2\sqrt{3}y}{4(x+c)}=r$$
$$r=\frac{\sqrt{3}y}{2(x+c)}$$
Finally:
$$\frac{r}{R}=(\frac{\sqrt{3}y}{2(x+c)})(\frac{\sqrt{3}}{c})$$
$$\frac{r}{R}=\frac{3y}{2c(x+c)}$$
 [/INST] Goku's solution with some geometric point of view:

*

*Dropping a perpendicular from $O$, the circumcenter, to side $c$, we have $\frac{c}{2}=R\sin C=R\sin120^{\circ}$ and hence $R=\frac{c}{\sqrt 3}.$

*Droping perpendiculars from the incenter $I$, to the sides $a,b,c$ we find:
$a=r\cot\frac B2+r\cot \frac C2=r\cot\frac B2+\frac{r}{\sqrt3}\tag1$
$b=r\cot\frac A2+r\cot \frac C2=r\cot\frac A2+\frac{r}{\sqrt3}\tag2$
$c=r\cot\frac A2+r\cot \frac B2.\tag3$
Now, $(1)+(2)-(3)$ gives $a+b=c+\frac{2r}{\sqrt 3}$ and hence $r=\frac{\sqrt 3}{2}(x-c)$.

From 1 and 2, $$\frac rR=\frac{\frac{\sqrt 3}{2}(x-c)}{\frac{c}{\sqrt3}}=\frac{3(x-c)}{2c}=\frac{3(x^2-c^2)}{2c(x+c)}=\frac{3y}{2c(x+c)}$$
which is, I mean the final expression I found as the answer is, not only consistent but looks exactly like Goku's final expression for the answer.
</s>