I'm going to work through the first one and let you use this logic to solve the 2nd and 3rd ones.
Let C = # cats
D = # dogs
C + D = 42
3C + 6D = 180
Let's multiply the first equation by 3 so that both equations have a 3C term
3C + 3D = 126
3C + 6D = 180
Subtract the 1st equation from the 2nd equation (or you can subtract the 2nd equation from the first). This will eliminate the C term.
3D = 54
D = 18
Now use D=18 in the first equation to solve for C
C + D = 42
C + 18 + 42
C = 24
Use this logic to solve the other problems.