I can only speak to the wrx motor and the answer is yes. The 2.0L usdm and 2.5L usdm blocks are pretty much the same. Obviously the bore and stroke are different but all of the accessories and junk bolt up to to either block. You will need a STi compatible clutch and a six speed trans mount . The drive shaft from an automatic wrx and depeniding on the year of the trans axles are also need. Not always on the axles . Certain year transmissons do not require the axles. A 3:90 rear diff and some means to control the dccd are also needed. Be advised that I am on my third glass glass of scotch so i may have left some isht out LOL !
Oh yeah, the 2.5rs trans is good to about 300 whp due to it’s more drive train friendly final drive ratio.