In this problem, P is the total power generated within the entire planet. ΔQ/Δt is the rate of heat transfer through the surface of a sphere of radius r<R. In steady state, ΔQ/Δt must equal the power generated within a sphere of radius r, not within the entire planet.