Let's represent birds by the letter x and cats by the letter y. Since birds have 2 legs, and cats have 4, we can express this as:
[tex]138 = 2x + 4y[/tex]
[tex]52 = x+y[/tex]
We can solve by substitution. Let's solve for x in the second equation:
[tex]x = 52-y[/tex]
Replace every x in the first equation by that:
[tex]138 = 2(52-y)+4y[/tex]
[tex]138 = 104-2y+4y[/tex]
[tex]138 = 104 + 2y[/tex]
[tex]34 = 2y[/tex]
[tex]y = 17[/tex]
Now, plug that in for y in second equation and solve for x:
[tex]52 = x + 17[/tex]
[tex]x = 35[/tex]
Since x was the number of birds and y was the number of cats in the store, there are 35 birds and 17 cats in the store.