How to Make a Pet AI

So I put together this AI that follows the player, and now I want to make it so when an enemy is near, the pet moves towards it to alert the player. The problem is since it’s already following me, I can’t get it to break it to go to the enemy. If someone could give me some ideas how to go about this, even for making my blueprint from scratch, I would appreciate it. Thank you.

what do you have thus far for your blueprint? you could always use behavior trees but if you already have a system maybe it can just be modified