I, Always go by answers for such questions

Condition 1 : There are 300 more cats and dogs at the shelter in City Y

We can strike away A,B

So we start evaluating answer choice C.

If total number of cats & dogs is 350, CityX has 50 and CityY has 350

According to ratios, we will have

CATS:DOGS(City X) 20,30

CATS:DOGS(City Y) 105:245

Adding them doesn't give us our final ratio(8:17)

Next Option D : 400

If total number of cats & dogs is 400, CityX has 100 and CityY has 400

According to ratios, we will have

CATS:DOGS(City X) 40,60

CATS:DOGS(City Y) 120,280

Adding them we get our final ratio(8:17) of cats and dogs. (Option D)

_________________

You've got what it takes, but it will take everything you've got