Let x be the initial amount of cards that Michael had.
Since he bought 8 new Pokémon cards, the total number of cards that he had at that moment was x+8.
After his dog ate half the amount of cards that Michael had, the number of cards was reduced to:
Since he has 40 cards left, then:
Solve for x to find the amount of cards that Michael had at the beginning. Multiply both members by 2:
Substract 8 from both members of the equation:
Therefore, the amount of cards Michael started with, was: