Power output in an Arduino using analogwrite()
I think that you are mis-applying \$P=\frac{V^2}{R}\$. I don't think that formula is valid when \$V\$ is the average of a time-varying waveform. I think it is only valid for the instantaneous voltage and power.

In order to find the average power in this case, you can frst calculate the power that would be dissipated in the resistor by a steady 5V DC, and then multiply that value by the PWM factor, \$\frac{100}{255}\$.



Consider, if the output voltage was +5V half the time, and -5V half the time. The average voltage in that case would be zero, but the average power would be 100mW.



P.S.:

If that was homework, I would ask my teacher, "What do you mean, 'Power delivered through the resistor?'" Delivered through the resistor to what other component?... Oh! I get it! You mean power dissipated by the resistor!