Let the age of Rakesh be x years.
Then, the age of Kasim will be (x + 6) years.
Sum of their ages = x + (x + 6) years
It is given that the sum of their ages = 54
∴ x + (x + 6) = 54
x + x + 6 = 54
2x + 6 = 54
Subtracting 6 from both sides, we obtain:
2x + 6 – 6 = 54 – 6
2x = 48
Dividing both sides by 2, we obtain:
x = 24
∴ Rakesh’s age is 24 years.
And Kasim’s age is (x + 6) years = 24 + 6 = 30 years.