So let's take a peek at both's ages, keep in mind, every year, is 1year added to Irene and 1year added to Fred
so... if we look at their ages

notice, Fred is always 40years older than Irene
thus, whatever age Irene is, let's say "i", then Fred is " i + 40 "
now, when is Fred 5 times Irene's age or 5*i or 5i? well,
f = fred's age i = irene's age
f = i + 40
now if f = 5i
5i = i + 40 <--- solve for "i" to see how old Irene was then