It was narrated from 'Usamah bin Sharik that the Messenger of Allah (ﷺ) said:
"No person will be punished because of another's crime." (RU)
English reference (RU): Vol. 3, Book 21, Hadith 2672 (RU)
Arabic reference (RU): Book 21, Hadith 2774 (RU)