runnah's advice to the contrary, WRX trans probs are more often due to pilot error (due to ppl rushing the shifts) than inherent probs in the boxes.
good synthetic gear lube doesn't hurt, either.
anyway, look for trans code on upper RH edge of bell housing (looking from front of engine), near the brake booster. it'll be a row of code on white background, you'll probly need a light to spot it under layers of road grime and spiderweb of vac & fuel hoses, etc.
all USDM WRX 5-spd codes begin with T754
MY-specific codes are as follows:
VN2AA -- MY 02
VN2BA -- MY 03
VV4AA -- MY 04
VV5AA -- late 04
VZ6AA -- MY 05
USDM WRX boxes have 3.9 final drive, ratios are same for all years.
USDM Forester and Baja Turbos have essentially same gearbox as well