I hate these question but here we go.
the order of the kids go from greatest-least in this order= Tommy, Carla, Jim
lets say Jim is x then that means Carla is x+5 which means Tommy is x+5+6
so the equation would be; x+x+5+x+11=31
then we add like terms giving us; 3x+16=31
subtract 16 from both sides; 3x=15
divide 3 from both sides; x=5
in other words, Jim is 5 years old, so add 5 years to that to get Carla's age which is 10 and add 6 years to Carla's age to get tommy's age which is 16.
Therefore,
Jim= 5 yrs; Carla= 10 yrs; Tommy= 16 yrs