Given:
The total number of hats, h=31.
The total number of shoes, s=96.
Let c be the number of cats and p be the number of parrots.
Hence, the expression for the total number of hats can be written as,
A cat has 4 legs. So, the total number of shoes for cats is 4c.
A parrot has 2 legs. So, the total number of shoes for parrots is 2p.
Now, the expression for the total number of shoes can be written as,
Multiply equation (1) by 2.
Now, subtract equation (3) from equation (2).
Substitute the known values in the above equation to find the number of cats c.
Therefore, the number of cats Smith has is 17.