this is the saying attributed to Ibn Abbas:
اجتماع الخضر والياس عليهما الصلاة والسلام في كل عام في الموسم بمنى.
قال في الدرر أخرجه الحارث بن أبي أسامة في مسنده بسند ضعيف عن أنس، وأخرجه أبو إسحاق الزكي في جزء له عن ابن عباس، وقال في التمييز تبعا للأصل كشيخه الحافظ ابن حجر منكر لا يثبت فيه شيء، وزاد في الأصل وأخرجه الدارقطني عن ابن عباس ولا اعلمه إلا مرفوعا قال يلتقي الخضر وإلياس كل عام بالموسم بمنى، فيحلق كل واحد منهما رأس صاحبه، ويتفرقان عن هؤلاء الكلمات: بسم الله ما شاء الله لا قوة إلا بالله، ما شاء الله لا يصرف السوء إلا الله، ما شاء الله ما كان من نعمة فمن الله، ما شاء الله لا حول ولا قوة إلا بالله
it is summed up in that Al Khidr and the prophet Ilias meet each other in Mina-near Makkah- every year at the time of the pilgrimage, so then each of them shaves the head of the other and then say:in the name of god, no ability/strength except by god, whatever he wills, none casts away evil-literally badness- except god, whatever god will whatever blessing is from god, whatever god wills..
I'm not currently in the mood, so I didn't translate the alleged 'prayer' to the best I can, but it is very clear from the ridiculous story associated that it is not correct.