Consider two resistors of resistances R1,R2 respectively.
When they are in series connection,R1+R2=80
When they are in parallel connection,R1R2R1+R2=20
(80−R2)(R2)80=20
(R2)2−80R2+1600=0
Applying Sree Dharacharya Rule of Quadratic Equation,
R2=80+−√802−4×1×16002×1
R2=40Ω
R1=40Ω