Power dissipated by a resistor = (current)² x (resistance).
0.25 W = (0.02 A)² x (resistance)
This resistor = (0.25 W) / (0.02 A)²
This resistor = 625 ohms
If we want it to dissipate 0.5 W, then
0.5 W = (current)² x (625 ohms)
Current = √(0.5/625)
Current = √(0.0008)
Current = 28.28 mA
============================
A slightly easier way:
Since the power is = I²R, it grows in proportion to (current)² .
We want to double the power dissipated, so we only need to increase the current by the factor of √2 .
(20 mA) x (√2) = 28.28 mA