The green cap is in the hidden area of the Hazy Maze Cave. Not sure if thats the correct level name, but it is the level in the basement where you jump into a pool of murky water.
Anyways, just look around here
http://www.gamefaqs.com/console/n64/game/198848.html
You should find what you need.