Each person's age is expressed in terms of Sam's age. Therefore, we can let x = Sam's age.
John's age is (x + 9)
Razi's age is (x - 2)
x + (x + 9) + (x - 2) = 41
3x + 7 = 41
3x = 34
x = 34/3 = 11 1/3
Sam is 11 1/3 years old, or 11 years and 4 months
That would make John 11 1/3 + (9) = 20 1/3 or 20 years and 4 months
In 8 years, John would be 28 years and 4 months