«مَرَرْتُ بِاللَّذَيْنِ نَجَحَا» — I passed by the two who succeeded.
«بِـ» is a preposition; «اللَّذَيْنِ» is genitive, marked by yāʾ; «نَجَحَا» is the ṣilah, whose dual suffix is subject and ʿāʾid.
The form «اللَّذَيْنِ» serves both accusative and genitive roles: the governing element decides.