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