Let x = age of jack
Let y = age of Lacy
x=3y (Jack age is 3 times that of Lacy)
(x+y)-8 = 25
Substituting value of x:
(3y+y) -8 = 25
4y - 8 = 25
4y = 33
y = 33/4 = 8.25 or 8 years 3 months (age of Lacy)
x = 3(8.25) = 24.75 or 24 years 9 months (age of Jack)
Checking:
Substituting in equation ( x + y ) -8 = 25
24.75 + 8.25 - 8 = 25
25 = 25