Final answer:
To find the total number of animals, set up a proportion using the given ratio of guinea pigs to hamsters. Solve for the unknown number of hamsters, then add the number of guinea pigs to find the total.
Step-by-step explanation:
To find the total number of animals in the pet shop, we can use the given ratio of guinea pigs to hamsters. The ratio is 5:6, which means for every 5 guinea pigs, there are 6 hamsters. Since we know there are 30 guinea pigs, we can set up a proportion to solve for the number of hamsters:
5/30 = 6/x
Cross-multiplying, we get 5x = 180. Dividing both sides by 5, we find that x = 36. Therefore, there are a total of 30 guinea pigs + 36 hamsters = 66 animals in the pet shop.