Definetly no train tracks or roads even for that matter, you will need to take boats. From Iquitos in Peru to Manaus im guessing the boat would be around 30 dollars take about 5 days include food and you sleepin your own hammock (my guess).
Them boats have been hitched but you would need Spanish´or Portugese to pull that off, you could canoe it too but that would mean buying a Canoe.
The only way hitchhiking would be from Venezuela but the border with Colombia is now closed so thats impossible too from Peru