Adam could fit w action figures on each shelf in his room. His room has could hold x action figures. How many total shelves did his room have?
Let's say that Adam has y shelves in his room. 

Then we know that: 

y * w = x 

That is, y shelves can hold w action figures each, and in total, this is equal to x action figures. 

Now we can solve for y: 

y = x / w 

That is, the total number of shelves that Adam's room has is equal to the total number of action figures that it can hold, divided by the number of action figures that can fit on each shelf.