Think you will get this now, you are almost there, you need to: 
i) Find the animal that the user selected in the animals hash; 
ii) Remove the animal from the animals hash; 
ii) Add the animal to the clients num_pets hash;

animal = shelter.animals[adopted]
shelter.animals.delete(adopted)
shelter.clients[adopter].num_pets[animal.name] = animal