Givens
r1 + r2 = 18
r1*r2 / (r1 + r2) = 4
Sub and Solve
There are many ways to proceed. I like to find r1*r2 and that simplifies things.
substitute 18 for r1 + r2
r1*r2 / 18 = 4 multiply by 18
r1 * r2 = 4 * 18
r1 * r2 = 72
Now you can set up a quadratic. Using r1 + r2 = 18, solve for r1
r1 = 18 - r2
Substitute into r1*r2 = 72
r2*(18 - r2) = 72 Remove the brackets.
18r2 - (r2)^2 = 72 Bring the left side over to the right side.
0 = (r2)^2 - 18r^2 + 72
This factors
(r2 - 12)(r2 - 6) = 0
r2 - 12 = 0
r2 = 12
or
r2 - 6 = 0
r2 = 6
r1*r2 = 72
r1*12 = 72
r1 = 72 / 12
r1 = 6
r1 = 12 when r2 = 6.
Answers
r1 = 12
r2 = 6
or
r1 = 6
r2 = 12