We have to evaluate Kim's age when Tom's age is a.
We have to build a relationship between Tim's age and Kim's age. If we look at their ages carefully we can see a pattern and their relation can be described as:
Thus, when Tim's age is a, we can compute Kim's age as: