Let the resistance of the coils are R1 and R2
Heat produced in coil 1 H1=V12R1t1
Heat produced in coil 2 H2=V22R2t2
When the two coils are connected in series, current is same
Req=R1+R2
Req=V12H1t1+V22H2t2
I2R2Ht=I2R12H1t1+I2R22H2t2
t=HR2(R12H1t1+R22H2t2)
When the two coils are connected in parallel, voltage is same
1Req=1R1+1R2
1V2Ht=1V2H1t1+1V2H2t2
t=HV2⎛⎜ ⎜ ⎜ ⎜⎝1V2H1t1+1V2H2t2⎞⎟ ⎟ ⎟ ⎟⎠