If you're going to Cuzco and you want to see the rain forest, I wouldn't recommend doubling back through Lima to go to Iquitos. This is a lot of travel. You can get directly to Puerto Maldonado from Cuzco and from PM you can do an eco-tour up the Río Tambopata. It's a very well-run eco-tourism company and there's a lot to see there, and all you really miss is the hugeness of the Río Amazonas.
Lima is worth spending a couple of days in. Tour the old colonial center and the cathedrals including the "catacombas", and be sure to have your fill of seafood---the ceviche lunches are an experience not to be missed. My favorite cevicherías: La Mar and Pescados Capitales on Av. La Mar in Miraflores; Francesco on the Malecón in Miraflores; Alfresco in Miraflores near Parque Kennedy; Los Cavenecia behind the "Neoplástico" hospital at Angamos and Aviación in San Borja; also try the popular chains Punta Sal and Segundo Muelle, both with outlets throughout Lima.
If you have any extra time at all, try a couple of days in Arequipa. It's a fascinating city.
Enjoy!