a pet shop owner had an equal number of hamster and puppies for sale. the hamster were put equally int o 4 cages and the puppies were put equally into 12 cages. at the end of the day, he had sold 3 cages of hamsters and 6 cages of puppies. if the total number of animals sold was 30, how many hamsters and how many puppies were sold?