I just finished the swap of a 2.5 dohc from a 98 forester into a 96 imprezza wagon with a 2.2 that had bottom end problems.
At start up the rpms immediately shoot up to about 4000.
I used the timing cam and crank sprocket from the 2.5, intake and intake wiring harness from the 2.5. So a complete drop in.
I tried changing both the tb and iac off of the 2.2 manifold, no change
The 2.2 did not have egr, the donor does, I removed the tube and plugged both ends and installed a solid plate between egr and manifold, and plugged vacuum hoses, not sure what I'm missing here, vacuum lines are slightly different but I think they are correct