We can combine the power equation above with Ohm's Law to write a specific power equation for resistors---two equations, in fact. Substituting \(\Dl V=IR\) into \(P=I\Dl V\) gives us $$P=I^2R$$ On the other hand, if we use the conductance version of the power law \(I=G\Dl V\), we can get $$P=(\Dl V)^2G {\quad\rm or\quad} P=\frac{(\Dl V)^2}{R}$$
The question is: is the resistance directly proportional to the power, or inversely proportional? And it looks like we have a contradiction: the equation \(P=I^2R\) suggests that they are directly proportional, while the equation \(P=(\Dl V\)^2/R\) suggests the opposite.
To solve this conundrum we must consider the context. Clearly, a 40 watt light bulb doesn't always emit 40 watts of power, not when it's sitting in a drawer or connected to a AA battery. It only emits 40 watts when plugged into a wall socket, which provides a specific potential difference of 120V. This potential difference is the same for both light bulbs, so in the formula $$P=\frac{(\Dl V)^2}{R}$$ increasing $R$ doesn't change $\Dl V$, and so $P$ must decrease. The bulb which emits less power has the higher resistance.
If we consider the formula $$P=I^2R$$ and increase the resistance, we can't assume that the power increases because the current isn't constant. In fact, the current decreases as you increase the resistance in this case. The power is the product of an increasing number and a decreasing number, and without knowing how they are increasing or decreasing we can't say anything about what the power does. In short, when you have two apparently contradictory equations like \(P=I^2R\) and \(P=(\Dl V)^2/R\), and you want to know how P and R are related, choose the equation with the constant value.