if there are 3 times as many dogs as there are cats, then that means there are 4 "parts" total.
3 × n dogs + 1 × n cats = 4 × n animals = 28
We know that the dogs account for 3/4 of the animals, while the cats account for the remaining quarter.
Hope I helped:P