Solving problems on ages is a two step process.
Create linear equations based on statements provided.
Solve the equations to get the values as required ages.