Meaning and case together distinguish the fa'il from the maf'ul bihi.
ضَرَبَ حَامِدٌ مَحْمُودًا — Hamid struck Mahmud.
- حَامِدٌ performed the action: fa'il and marfu.
- مَحْمُودًا received the action: maf'ul bihi and mansub.
The final fathah on مَحْمُودًا supports the analysis, but first understand who acted and who received the action.