In ضَرَبَ زَيْدٌ عَمْرًا, عَمْرًا follows the verb but is not the fāʿil; it is the direct object. Zayd is the fāʿil because the striking proceeds from him.
Method: understand the verb, identify who performs the action and who receives it, and then determine case. Do not decide from proximity or word order alone.