The Legacy sensors have long leads that go to the bellhousing area. The WRX sensors, as show in the pic, plug in to the engine harness at the sensor.
The engines have about the same capabilities. The Legacy uses a stub rocker valve arraingement that is prone to ticking. The WRX uses a cam-over-bucket design. The Legacy has larger head chambers (and smaller piston chambers) than the WRX. The Legacy has no direct USDM eqivalent, while you can use '96 Outback/GT parts for the WRX head.