Code:
/cleartarget
/targetexact NameOfPerson
/focus [@targettarget,exists,harm,nodead][exists,harm,nodead]
/targetlasttarget
This will target the named person, then if they are found it will set your focus to their target (only if their target is alive and an enemy). If the named person isn't found or their target is dead etc then it will focus your target (again only if your target is alive and an enemy).
It will then target whatever you last had targetted, alternatively if you prefer you can change it to target whatever you just set to focus.
I've presumed that you don't want to accidentally target friendly players/NPCs.