Ok, imagine you and your friend are playing a game where you pretend to be princesses. You both have a special power that lets you be the queen too. You agreed that whoever is the queen has the most power and can make all the decisions.
Now, let's say that one day your friend decides to quit the game, but then comes back and says she is still the queen and should make all the decisions. This would be like the concept of "cum ex apostolatus officio" in the olden times.
This phrase means that if someone who was in charge of making important decisions for the church (like a bishop or a pope) was not really supposed to be in charge, then everything they did wouldn't really count or make sense. It's like they didn't have the power to make those decisions.
So, just like in your princess game, if the person who was supposed to be in charge was replaced by someone who wasn't supposed to be in charge, then all the decisions and actions made by the wrong person would not be valid.