The teams' ranking will be determined by, first of all, the level each player is in and, in the event that two or more players are at the same level, the number of medals each team member has will count as a tiebreaker.
When entering the "Teams" section, in the "My team" tab, you will find the list of members ordered by ranking. To the right of each name you will see the level and number of medals of the users respectively.