Hi Craig
The dealer is assuming that the headunit is the original ...if it had been replaced then the VIN would not necessarily be the key to the 4 digit code.
Maybe worth trying the first 4 digits or the last 4 digits of the 6 handwritten numbers. If that doesn't work, find the serial number of the headunit itself (Clarion or Alpine or Pioneer?) and phone the local agents.
Do you have a copy of RAVE applicable to your 97 model P38? The Owner's Manual for that year is part of the collection of documents in the RAVE with more info.
Hope you find it!
cheers
MY99 RR P38 HSE 4.6 (Thor) gone (to Tasmania)
2020 Subaru Impreza S ('SWMBO's Express' )
2023 Ineos Grenadier Trialmaster (diesel)
Bookmarks