To get 350-400 awhp reliably will require an aftermarket turbo and forged internals.
As far as swpping it in, the most difficult part will be the harness, and there's tons of info out there to handle that. You'll want to swap the transmission as well, since that much power (nearly 500 crank hp) will turn a 2.5i and WRX transmissions into so much shiny confetti. The STI 6-speed is damn near bombproof though. If you look around, you can get a good deal on an STI driveline. I picked up: clutch, slave cyl, 6-speed, shift linkage, driveshaft, R180 diff, all four axles, and all four knuckles for $4500.
You may end up spending more, once you're done, than just buying a WRX or STI. But most swaps are usually in danger of that. That's why most people looking to do a swap like this start with an 01 or earlier Impreza. Now if you think this might turn into a long-term build. Then just swapping in a stock WRX or STI motor is not exceedingly difficult.