Unlike some of the other countries where Kandoo runs treks, there is no special requirement that your passport be valid for 6 months longer than your expected stay. As long as it is valid through your departure date, you’re fine.
Better still, British and EU nationals do not need a visa to come to Peru as a tourist. You can get permission to visit upon arrival at the airport, and the duration is usually up to six months. American citizens and nationals don’t need a visa either so long as they have a valid US passport, but will generally only get permission to stay as a tourist for 90 days. Still, this is usually plenty of time.
If you are coming into Peru from Ecuador, get your passport stamped for entry at the local immigration office nearest your border crossing. Most enter this way through Aguas Verdes in the Tumbes region. Make sure you find your way to the immigration office there, as if your passport is not stamped you will have to go back to the Ecuador border if your papers are inspected. You may also have trouble if you do not have a valid exit stamp from the country you left before coming to Peru, so do make sure you dot all the i’s and cross all the t’s.
Those entering overland from Columbia generally enter through Leticia. You will need to get your passport stamped in Santa Rosa, on the Columbia/Brazil/Peru border. Please keep in mind that Santa Rosa is rather under-policed, and tourists should avoid isolated places, and travel only in groups.
Lastly, if you are crossing into Peru from Bolivia by road, you’ll need to visit the immigration office for the Puno region, in Desaguadero.