If 6 and x have the same mean as 2, 4 and 24, what is the value of x?

Answer: 
14
If 6 and x have the same mean as 2, 4 and 24, what is the value of x?