رَأَيْتُ الطَّالِبَيْنِ كِلَيْهِمَا.
Translation: I saw both students, both of them.
كِلَيْهِمَا: emphatic expression, accusative with yāʾ.
مَرَرْتُ بِالطَّالِبَيْنِ كِلَيْهِمَا.
Translation: I passed by both students, both of them.
كِلَيْهِمَا: emphatic expression, genitive with yāʾ.
Result: كِلَاهُمَا is used in the nominative, while كِلَيْهِمَا is used in the accusative and genitive.