Let c = cost per cat
Let d = cost per dog
164c + 24d = 4240
d = 2c

Solve by any method mentioned.
If done algebraically with substitution:
164c + 24d = 4240
d = 2c164c + 24(2c) = 4240
164c + 48c = 4240
212c = 4240
c = 20
She can spend $20 on each cat.
d = 2c
d = 2(20) = 40
She can spend $40 on each dog. 