Yes, malllyh, it works if you are being asked any question in the similar form of how old you'll be in five years time and then how old you'll be in three years after that; the first answer will be whatever your age is plus five years and the second will be your age plus five years plus three years, that is eight years.
And it works the other way: we don't know what her age is now or, of course, what it'll be in five years time. Instead of writing "whatever it will be in 5 years time" we write "X" Her age now, we are told,is five years younger, less than,that age "X" so we'll call it "X minus 5" or X-5. And we are asked what her age was 3 years less than that, 3 years ago. That's another minus of 3 years. She is now X-5. Taking another 3 off means she was X minus 5 minus 3. That's a total of 8 minuses: X -8.