The commander's lvl = 0.8 x lvl of the player (for version 5, 15, 30) The lvl of the commander = 0.82 x lvl of the player (for version 45)
Lvl of the sub-pet = (0.75 x lvl of the player) OR lvl cap (see table above) which is always lower.
The overall max level of combined sub pets is I think 74 at 50 if you add the levels of the pets together, and you can't go under and if you were to go over you wouldn't be able to summon the 3rd pet.
Source for above info: https://www.uthgard.net/forum/viewtopic.php?f=115&t=38851