Pretty sure most of us just bolt them on and hope. . .provided the FD ratios are correct, which is easier to look up.
95-98 I'm pretty sure any OB auto will work with any other OB auto same year. 99 is different, or at least the bell housings gained 4 extra bolts. That continued on into the 2nd gen cars. They will physically bolt up (even with the extra bolts) and should plug in but whether it'll work or not I can't say.
The rule of thumb on final drive ratios is it's dependent on overall tire size. . . so when going from an Outback to a Legacy, shorter tires=more revs per mile=higher FD ratio. . . so Outback autos typically have 4.44:1 final drive ratios, Legacy autos will be 4.11:1. Manual trans cars get different FD ratios still. . .same rules apply tho.
You can run a regular Legacy auto trans in an Outback if you swap the rear diff along with it. There are some benefits to doing this, better fuel economy mostly. Your takeoff times will decrease so don't go that route if you plan on drag-racing it. . .horrible 60 foot times anyway :lol: