Let R be the number of rabbits and C the number of cats. Since the pet store has 17 rabbits, then:

Then, the store have 5 fewer cats than rabbits. We can write this as:

Since R=17, we have:

Then there are 12 cats in the store. Finally, in total we have:

Therefore, there are 12 cats and 17 rabbits, making 29 altogether