First, let us define our variables.
Let
x = age of the father
y = age of the son
z = age of the daughter
5 years ago..
(x – 5) = age of the father
(y – 5) = age of the son
(z – 5) = age of the daughter
After 18 years...
(x + 18) = age of the father
(y + 18) = age of the son
(z +18) = age of the daughter
From the first condition
y = z + 5 à
eqn 1
5 years ago
(x-5) = 23 + (y-5) + (z-5)
x –y –z = 18 à
eqn 2
after 18 years
(x+18) = 17*[(y +18 –z – 18)]
x – 17y + 17z = -18 à
eqn 3
solving the 3 equations simultaneously
x = 67
y = 27
z = 22