The actual rule for carry pet experience is that it has to be active on the front row at the end of at least one round. There are various conditions that can provided that:
1. If carry pet used on the first turn, either pass or use an ability
2. If current pet died, select carry pet (this is the end of the round). You can switch out immediately (which happens at the beginning of the next round).
3. Manually swapping in a pet even though current pet isn't dead (can swap out next round)
4. Force swap abilities (enemy or your own) that bring the carry pet to the front line. Next round you can swap right back out.
5. Your first pet is dead and your second pet dies on the same round that the entire enemy teams dies. This forces your carry pet to the front for the very last round and gives it exp (this is how the explode strats for Mo'ruk and Thundering Spirit work).
There may be others, but that covers most of the ways.
More info here:viewtopic.php?f=10&t=8829