That grill looks like 95-99 Legacy/Outback. These only came with Phase 1 engines, either a SOHC 2.2 in the early years, or a DOHC 2.5 later.
But the engine is pretty clearly a phase 2 SOHC engine. That would mean it's not original.
A 99 Outback Sport (based on the Impreza) would have a phase 2 EJ22.
Look on the passenger side, vertical surface of the block, right next to the bellhousing. There will be a flat spot in the casting roughly 1x3". All USDM engines will have the original VIN engraved on this surface. That will give you the information. At a glance, the 4th digit will tell you what chassis (B = Legacy, G=Impreza, S=Forester), and the 10th digit will tell you the VIN (W, X, Y, 1, 2 = 98, 99, 00, 01, 02 respectively, ETC.). And there are many tools online to decode a vin to the specific vehicle.