Call a lock Smith or remove the interior trim panel and manually open the gate. If your lock cylinder has rusted or damaged buy a new one or used one from a salvage yard.
Pretty easy to crawl in from the front and pop the interior panel off, release the lock lever and then open from the outside...UNLESS you've a rusted hatch handle too! A new lock cylinder and pair of keys is under $20. I may have one set in the garage, but perhaps tossed it when dumping all '95-'99 stuff years ago. Lemme know if you want it later.
Search Subaru Legacy Questions
Subaru Legacy Experts