ضَرَبَ زَيْدٌ أَخَا حَامِدٍ — Zayd hit Hamid's brother.
● زَيْدٌ is the subject.
● The complete phrase أَخَا حَامِدٍ is the object.
● The leading word changes from أَخُو to أَخَا because the whole phrase is now accusative.
The possessor حَامِدٍ remains genitive; the grammatical role of the whole phrase is shown on its leading word.