Isma'il bin Abd al-Rahman bin Dhu'ayb (may Allah have mercy on him) said: I accompanied Ibn Umar (may Allah be pleased with them both). When the sun set, we were too much in awe of him to tell him to stand for the prayer. When the whiteness of the horizon had gone and the darkness of the evening had set in, he dismounted and prayed three rak'ahs and two rak'ahs. Then he turned to us and said: This is how I saw the Prophet (peace and blessings be upon him) do it.
The narration of Imam al-Shafi'i (may Allah have mercy on him) is: We set out with Ibn Umar (may Allah be pleased with them both) towards the pasture, and the sun set. We were too much in awe of him to say to him: Dismount and pray. When the whiteness of the horizon and the darkness of the evening had gone, he dismounted and prayed three rak'ahs and ended with the salam, then he prayed two rak'ahs and ended with the salam. Then he turned to us and said: I saw the Messenger of Allah (peace and blessings be upon him) do it like this.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الصلاة / 5519