C)
Let the ages of the five persons at present be a, b, c, d & e years.
And the age of the new persons be f years.
So the new average of five members' age = (a + b + c + d + f)/5 ------- (1)
Their corresponding ages 6 years ago = (a-6), (b-6), (c-6), (d-6) & (e-6) years
So their average age 6 years ago = (a + b + c + d + e - 30)/5 = x ----- (2)
==> a + b + c + d + e = 5x + 30
==> a + b + c + d = 5x + 30 - e ------ (3)
Substituting this value of a + b + c + d = 5x + 30 - e in (1) above,
The new average is: (5x + 30 - e + f)/5
Equating this to the average age of x years, 6yrs, ago as in (2) above,
(5x + 30 - e + f)/5 = x
==> (5x + 30 - e + f) = 5x
Solving e - f = 30 years.
Thus the difference of ages between replaced and new person = 30years.