Alright kiddo, let me try and explain what the phrase "the enemy of my enemy is my friend" means in a really simple way.
So, let's say you and your friend are playing a game and there's another kid who's always mean to you both. You don't like that kid because they are your enemy. But one day, you find out that someone else doesn't like that mean kid too.
This new person who doesn't like the mean kid could be someone who you normally don't like, but since they also don't like the mean kid that makes them your friend. Even though you might not agree with this new friend on everything, you have a common enemy - the mean kid - and that brings you together.
So basically, the phrase "the enemy of my enemy is my friend" means that when two people or groups have a common enemy, they can overlook their differences and work together against that enemy.