Answer:
There are 126 dogs, 86 cats and 42 guinea pigs at shelter.
Explanation:
Let C, D and G represent number of cats, dogs and guinea pigs respectively.
We have been given that an animal shelter has a total of 254 animals comprised of cats, dogs, and guinea pigs. We can represent this information in an equation as:

Further, the number of guinea pigs is one third the number of dogs. We can represent this information in an equation as:

There are 40 more dogs than cats. We can represent this information in an equation as:

Upon substituting equation (2) and (3) in equation (1), we will get:




Make a common denominator:







Therefore, there are 126 dogs at the shelter.
Substitute
in equation (2):


Therefore, there are 42 guinea pigs at the shelter.
Substitute
in equation (3):



Therefore, there are 86 cats at the shelter.