How do i knock back players on enemy teams 1.21.1

Im trying to make something where it knocks back enemy players in a 3 block radius. So if i was the executiong player and i was on team "red" and 2 blocks away from me there was an enemy on the team blue and a team mate then only the player on the blue team would be knocked away from me when i execute the command.
Continue to help post