He said, I was riding behind the Prophet ﷺ when he said to me, "Young man, I will teach you some words. Be mindful of Allah, and He will protect you. Be mindful of Allah, and you will find Him before you. When you ask, ask of Allah, and when you seek help, seek it from Allah. Know that the pens have been lifted and the pages have dried. If the entire nation were to gather to benefit you with something, they could not benefit you except with what Allah has already written for you, and if they were to gather to harm you with something, they could not harm you except with what Allah has already written against you."
حدثنا يحيى بن إسحاق حدثنا ابن لهيعة عن نافع بن يزيد أن قيس بن الحجاج حدثه أن حنشا حدثه أن
قال كنت ردف النبي ﷺ فقال لي يا غلام إني محدثك حديثا احفظ الله يحفظك احفظ الله تجده تجاهك إذا سألت فاسأل الله وإذا استعنت فاستعن بالله فقد رفعت الأقلام وجفت الكتب فلو جاءت الأمة ينفعونك بشيء لم يكتبه الله عز وجل لك لما استطاعت ولو أرادت أن تضرك بشيء لم يكتبه الله لك ما استطاعت
Its isnad is sahih, and it is a repetition of 2669. As for the wording in this isnad, "Ibn Lahia narrated to us from Nafi bin Yazid," and so on, this is how it appears in both original manuscripts. It will come later in 2804 that Abdullah bin Yazid Muqri narrates it from Ibn Lahia and Nafi bin Yazid, from Qays bin Hajjaj. Tirmidhi likewise narrated it, 3:321-322, through the route of Ibn Mubarak, from Layth bin Saad, and Ibn Lahia, from Qays. So Ibn Lahia narrated it directly from Qays. Further discussion of this will follow there, Allah willing.