Need help with a focus macro

Not possible. You can only do that for people in your party. You can target it, set it as your focus, and switch back to your previous target though.

/target Named Mob #1
/focus [harm]
/targetlasttarget

That said, you’re likely better off with just a general focus macro that you press as you engage a new pack.

/focus

There’s other ways to get fancy with it too