You'll need to play as Diddy Kong (with a second controller) in either World 1-B or 7-B to pull this trick off. When fighting Mugly or Thugly, the rhino-like bosses, they'll usually try to attack by charging at you and swallowing you. Stand at one end of the stage away from Mugly or Thugly and shoot peanuts directly at the boss or specifically when their mouths are open (this is most of the time so you can just shoot continuously). If you get enough peanuts into their mouth they will pause to eat munch them, openly revealing the weak spot on their back. This gives you the perfect opportunity to attack them. You can also keep shooting to increase the time they stop and eat and let Donkey Kong attack them for you.