Peruvian Amazon and Itinerary recommendations?

I will be traveling solo to Peru this August for 3 weeks. I am hoping to spend a few days in the amazon but I am torn between Puerto Maldonado and Iquitos. I am hoping to accomplish this as affordably as possible and I am wondering which of these locations is generally cheaper? Also, as far as booking amazon tours online all the ones I’ve seen are quite expensive, would it be more economical to book these tours locally?

I’d love to hear about your experiences, any and all advice would be greatly appreciated! I have also included my rough Itinerary below:

Day 1: Arrive in Lima early morning

**Peru Hop to Cusco**

Day 2: Lima-Paracas

Day 3: Paracas -Huacachina

Day 4: Huacachina-Nazca-Arequipa

Day 5: Arequipa

Day 6: Arequipa- Colca Canyon day tour

Day 7: Arequipa- Cusco

**Cusco/ Sacred Valley**

Day 8: Cusco

Day 9: Cusco-Ollantaytambo-Aguas Calientas

Day 10: Machu Pichu -Cusco

Day 11: Cusco- Rainbow Mountain

Day 12: Cusco

**Flex Days**

Day 13: Flex Day

Day 14: Flex Day

Day 15: Flex day

**Amazon Adventure**

Day 16: Cusco – Puerto Maldonado or Iqitos

Day 17: Puerto Maldonado or Iqitos

Day 18: Puerto Maldonado or Iqitos

Day 19: Puerto Maldonado or Iqitos-Lima

**Back to Lima**

Day 20: Lima

Day 21: Depart Lima early morning