Here you have to find the ages of father and son.
Let us assume father's present age is x years.
Sons's present age as y years.
8 years ago, fathers age would have been x - 8 years and sons age would have been y - 8.
Therefore, as given, x - 8 = 3(y - 8)
x - 8 = 3y - 24
x - 3y + 16 = 0.............(i)
2 years later father will be x + 2 years and son will be y + 2 years.
So,
x + 2 = 2( y + 2)
x + 2 = 2y + 4
x - 2y - 2 = 0 .........(ii)
Now solve the two simultaneous equations:
(ii) - (i) --> x - 2y - 2 - (x - 3y + 16) = 0
y−18=0→y=18 years. So the son's present age is 18 years.
substitute y in (ii)
x−36−2=0→x=38 years. So father's present age is 38 years.