What year it was when a person was 22 years old if currently, he is 25 years old and his birthdate is 1997?

I only know the formula for finding out the current age which is:

(current year) – (birthdate) = (current age)

But I'm wondering what if I wanted to find out what year was it when person was x years old if currently, person is y years old and his birthdate is in z?