Translation:What year was the year before last?
"The year before last" is indeed a valid phrase, but your sentence is missing the word "year" after "what"; it should be "What year was the year before last?" Otherwise, it's not clear from the translation that you're asking specifically what year it was (rather than, e.g. what happened that year).
Someone in 2022: "do you remember what happened the year before last year?(most languages have a much nicer way to express that and use this kind of wording rather than '2 years ago' for example in german you'd say 'vorletztes jahr' and in japanese the above sentence is probably somewhat nicer than 二年前) it was the year of the great apocalypse."