How would I make AI follow Other AI

So I made this enemy ai that wanders through the level, and runs towards the enemy when seen or heard. Then I made a smaller pet enemy that follows the player and makes noise when the player is seen. I can’t seem to figure out how to make the pet follow the enemy when idle. It follows the player and makes noise, but I can’t get the pet to follow the enemy. Could someone help me with this please?