$$ P_1= \epsilon^2/R_1, so R_1 = \epsilon^2 /P_1 $$
$$ P_2 = \epsilon^2 /R_1 so R_2 = \epsilon^2 /P_2 $$
a. When the resistors are connected in parallel to e.m.f. , the voltage across each resistor and the power dissipated by each resistor are the same as if only one resistor was connected.
$$ P_{tot} =P_1 +P_2 $$
b. When the resistors are connected in series, the equivalent resistance is $$ R_{eq} = R_1 +R_2 $$
$$ P_{tot} = \dfrac { \epsilon^2}{R_1+R_2} = \dfrac { \epsilon^2}{ \epsilon^2 /P_1 + \epsilon^2 / P_2 }= \dfrac {P_1P_2}{P_1 +P_2 } $$