Hi mia6,
You'll notice that the problem says that the resistance of the WIRE is 0.40 ohms. When you compute power, whatever resistance you use is where the electric power is consumed. In this case, the power is consumed by the wire itself, rather than by the appliances in the town. The wire will get warm, just like the wires in electric heaters and light bulbs, and it will produce 100kW of heat. But the wire is outide in the open air, so this heat is all going to waste. Only the 20kW that makes it to the town actually gets used by people, so this is the part that doesn't go to waste.
As an analogy, if you saw some money lying on a sidewalk, you would know that this was the amount lost by some person. You wouldn't have to subtract it from anything, because what you are seeing is already the lost money, not the money that's still in the person's pocket. Similarly in this problem, the electric power consumed by the wire is what is not making it to the town, so it is direcly the lost power, without having to subtract. On the other hand, if you subtract the lost power from the original power, you get how much actually arrived at the town, which is how I got the 20kW.
By the way, the point of this problem is to show you why major power lines must use very high voltages. In the USA, most major power lines use 540,000 volts instead of 240 volts. Because the power produced by a generator is P=IV, to get the same 120kW that the problem mentions, but using 540,000V, you would need only 0.222A, so the power lost in the wires would be 0.222^2*0.4 = 0.01975W. That's EXTREMELY much better, don't you think? Now the town gets 119.99998Kw and the wire loses 0.00001975kW, instead of the town getting 20kW and the wire losing 100kW.
Hope that helps!
--Stuart Anderson
Hi,mr_homm. Now I get it, thanks a lot.