yes swap the brackets they bolt too Look closely it’s easy to overlook and think it’s part of the engine.
Compare the hydraulic seal - use the one that’s the most dry. That indicates the seal is leaking.
I’d use the older two piece style one if the hydraulic seal is dry. They’re more reliable, the pulleys can be easily bought to get a new one.’although they are generally older. I’d get like an NSK or OEM brand if you do replace any pulleys.
97 are both interference engines - I’d use the old style tensioner, get a new Subaru belt and new lower clogged (toothed) pulley from Subaru or OEM brand. Those are by far the most likely parts to fail.
Although most 97s come with new style tensioners so the tensioner or engine may not be original to the legacy they came out of.
may not be a 97 engine that you got out of that legacy. It may have been swapped for a 96 at some point which is more likely to have an old style tensioner.
In which case it may not be an interference engine. Almost all EJ22s (in stock form) with the older style two piece tensioner are non interference.