We know the solution to the standard quadratic equation $ax^2+bx+c=0$ that
$x=\frac{-b\pm\sqrt{b^2-4ac}}{2a}$. So the roots are $\frac{-b+\sqrt{b^2-4ac}}{2a}$ and $\frac{-b-\sqrt{b^2-4ac}}{2a}$.
According to the question,
$$\begin{align}\frac{\frac{-b+\sqrt{b^2-4ac}}{2a}}{\frac{-b-\sqrt{b^2-4ac}}{2a}}& =r \\ \Rightarrow \frac{-b+\sqrt{b^2-4ac}}{-b-\sqrt{b^2-4ac}} &=r \\ \Rightarrow \frac{2\sqrt{b^2-4ac}}{-2b} &=\frac{r-1}{r+1};~[\text{Dividendo-Compendo}] \\ \Rightarrow \frac{b^2-4ac}{b^2} &=\frac{(r-1)^2}{(r+1)^2};~[\text{Squaring both sides}]\\ \Rightarrow 1- \frac{4ac}{b^2}&= \frac{(r-1)^2}{(r+1)^2}\\ \Rightarrow 1-\frac{(r-1)^2}{(r+1)^2} &= \frac{4ac}{b^2}\\ \Rightarrow \frac{4r}{(r+1)^2}&=\frac{4ac}{b^2}; ~[\because (r+1)^2-(r-1)^2=r^2+2r+1-(r^2-2r+1)=4r]\\ \therefore \frac{(r+1)^2}{r}&=\frac{b^2}{ac}\end{align}$$
So the correct answer is C.