Answer
The $5~\Omega$ resistor is dissipating $20~W$ of power.
The $20~\Omega$ resistor is dissipating $45~W$ of power.
Work Step by Step
We can find the current through the $10~\Omega$ resistor:
$P = I^2~R$
$I^2 = \frac{P}{R}$
$I = \sqrt{\frac{P}{R}}$
$I = \sqrt{\frac{40~W}{10~\Omega}}$
$I = 2~A$
This is the same current through the $5~\Omega$ resistor. We can find the power dissipated by the $5~\Omega$ resistor:
$P = I^2~R$
$P = (2~A)^2~(5~\Omega)$
$P = 20~W$
The equivalent resistance of the $10~\Omega$ resistor and the $5~\Omega$ resistor in series is $15~\Omega$. We can find the potential difference across this section of the circuit:
$V = I~R_{eq} = (2~A)(15~\Omega) = 30~V$
Since this is the same as the potential difference across the $20~\Omega$ resistor, we can find the power dissipated by the $20~\Omega$ resistor:
$P = \frac{V^2}{R} = \frac{(30~V)^2}{20~\Omega} = 45~W$