Translation:What year was the year before last?
What was the year before last? Should be an accepted answer. The word year after last is implied.
"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).
Sometimes it accepted the answer what was the year before last..but sometimes it marked it as wrong answer..so i am confused about whether the answer should be year before last or year before last year in this app
...Because it is wrong. Plenty of years came before last year: 2015, 1984, 1776, 1492, 200 BCE, etc. But only one year was "the year before last".
Outside of the fact that nobody would ever ask something like that, why "2 years ago" is not acceptable? Year before last is definitely less common than 2 years ago in regular speech.
But the sentence says 一昨年（おととし）, not 二年前（にねんまえ） - so you need to translate it as "the year before last", not "two years ago".
年 Toshi and Nen I have heard both in these excersices ... do they mean the same?