Let's just pretend you can get a good condition RB26 longblock for $2,500 then.
RWD Transmission will run you 1,000-1500... depending on what you do.
To get to 500whp you will need:
Engine management
Bigger Turbos
Bigger Injectors
Intercooler
BOV
Boost controller
If you can get all of the above for $1,000... you might be close and do it with 5k just as you wished.
Then the things that the forums usually don't tell you will pop up, and once you take care of the oil pan, clutch, and replace things here and there (water pump, oil pump, timing belt, etc.) you will be over the 5k, assuming you don't have to spend money on mounts, since you will need custom with either engine.
But realisticly, a good and tested RB26 (R33) w/ RB25 transmission will run 4,500 and up.
I think getoffmyinternet did one of the cheapest RB26 swaps you'll see. He spent 3k on engine and transmission and 4,400 on the swap. That's not counting anything else needed to be done to the car. And he is well under 500whp.