Three names, then everyone with no name
He was saying it inside the prayer itself.
اللَّهُمَّ أَنْجِ عَيَّاشَ بْنَ أَبِي رَبِيعَةَ، وَسَلَمَةَ بْنَ هِشَامٍ، وَالْوَلِيدَ بْنَ الْوَلِيدِ، اللَّهُمَّ أَنْجِ الْمُسْتَضْعَفِينَ مِنَ الْمُؤْمِنِينَ
Allāhumma anji ʿAyyāsha-bna Abī Rabīʿah, wa Salamata-bna Hishām, wa-l-Walīda-bna-l-Walīd. Allāhumma anji-l-mustaḍʿafīna mina-l-muʾminīn
“O Allah, save ʿAyyash ibn Abi Rabiʿah, and Salamah ibn Hisham, and al-Walid ibn al-Walid. O Allah, save the oppressed among the believers.”
Said in the qunūt, standing, before going down.
Where this comes from
Three men held back in Makkah and unable to leave. He named them out loud in the standing of the prayer, one by one, and then widened it to everyone in the same position whose name he did not have.
The full narration
Narrated Abi Huraira:The Prophet (ﷺ) used to invoke Allah in his prayer, "O Allah! Save `Aiyash bin Abi Rabi`a and Salama bin Hisham and Al-Walid bin Al-Walid; O Allah! Save the weak among the believers; O Allah! Be hard upon the tribe of Mudar and inflict years (of famine) upon them like the (famine) years of Joseph
Source
Ṣaḥīḥ al-Bukhārī · 6940
- Agreed upon as authentic (al-Bukhārī / Muslim)