Let d = number of dogs
b = number of birds
d+b = 71
Birds have 2 legs and dogs have 4 legs
4d+2b = 246
Multiply the first equation by -2
-2d-2b = -142
Add this to the second equation
-2d-2b = -142
4d+2b = 246
--------------------------
2d + 0b = 104
Divide each side by 2
2d/2 = 104/2
d = 52
There are 52 dogs