Yes they will work/bolt on, but depending on cretin things like I mentioned above the heads will need to have the 2.2L intake and exhaust manis swapped over to work. Along with all the sensors for the 2.2 stuff, and the need for the 2.2L harness and ECU.
So, your basically swapping backwards in power, efficiency and just wasting your all around time. Its a ton of work to swap a full harness, and it sounds like your not looking to keep the 2.2L after your 2.5L is rebuilt....??
The 2.2L head will be a big step backwards in flow/efficiency, due to the valves being way smaller then the 2.5i heads. The SOHC 2.5i heads flow better then WRX and most STi. On top of all that you would have to swap ECUs and the 2.2L ECU is not the same plug pattern as your current 2.5i ECU, so again its a harness swap dilemma.
If your looking to do it with the least amount of long term hassle/bug fixing/splicing and then maybe down the road retune. Juts put the 2.2L bottom end in with all of your current 2.5i bits and heads. The ECU will not even notice the difference in .3L for a daily driver. Or pull your current 2.5i motor strip it down and fix the bottom end, and just deal with being down a car for the 2-3 week to have a shop rebuild it.
If you have the money just get a used 2.5i long block and drop it in and your done. You should be able to source a used 2.5i motor with like 50-75k with all the accessories for $1500 if not $1000 and thats with probably a 90day 5k mile warranty