<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] Let’s assume $S$ is the Area of the triangle and $P$ is half of the perimeter.
If $x=a+b$ and $y=ab$ $\\$ then $(a-b)^2=(a+b)^2-4ab=x^2-4y$.
We know that $S=\frac{abc}{4S}$ and $r=\frac{S}{P}$ then using the Heron’s formula we have:$$\frac{r}{R}=\frac{\frac{S}{P}}{\frac{abc}{4S}}=\frac{4S^2}{Pabc}=\frac{4(P-a)(P-b)(P-c)}{abc}$$
And also, $(P-a)(P-b)(P-c)=\frac{c-(a-b)}{2}\times\frac{c+(a-b)}{2}\times\frac{x-c}{2}=\frac{c^2-(a-b)^2}{4}\times\frac{x-c}{2}$ $$=\frac{c^2-(x^2-4y)}{4}\times\frac{x-c}{2}=\frac{3y(x-c)}{8}$$
Therefore $$\frac{r}{R}=\frac{\frac{3y(x-c)}{2}}{yc}=\frac{{3(x-c)}}{2c}$$
Which is consistent with Goku カカロット
's final answer.
</s>