You have the ratio of dogs to cat is 5 to 7.
To determine how many cats are for 45 dogs, you simply consider that regardless the number of the dogs the ration must be equal.
Then, if x is the unknown number of cat for 45 dogs, you have:
5/7 = 45/x
You solve the previous equation for x as follow:
5/7 = 45/x multiply both sides by x to cancle the x in the denominator
(5/7)x = 45 multiply by 7 and divide by 5 both sides
x = 45(7/5)
x = 63
Hence, there are 63 cats whene there are 45 dogs