It's typical for a snake to refuse food when being treated for mites- due to the stress resulting from handling & being treated. While eating is important, getting rid of mites is MORE important, as they can kill a snake faster than you might think. Also, mites dehydrate a snake: each mite removes only a tiny amount of blood, but mites can be so numerous that they cause shock, circulatory collapse & organ failure- trust me on this. Anyway, a dehydrated snake is better off NOT eating, as they're likely to barf up their meal, unable to digest unless they have adequate hydration.
No way to tell you how long to get rid of mites: depends on how well you work at it- with the right methods & used correctly, thoroughly. Many have to battle them for a month or more- new generations will arrive if you miss any mites or any of their eggs- it doesn't take many to re-populate, so do it right the first time. But be safe- follow product directions EXACTLY so you don't harm your snake.
Doesn't matter where you keep the rat pup- good luck keeping it alive. Good luck with this, mites are miserable.