The mean is the sum of the elements in the dataset, divided by the cardinality of the dataset.
So, the mean of the dataset (including the unknown element) is
[tex]\dfrac{10+14+8+16+12+x}{6}=\dfrac{60+x}{6}[/tex]
We want the mean to be 13, so we want
[tex]\dfrac{60+x}{6}=13[/tex]
Multiply both sides by 6:
[tex]60+x=78[/tex]
Subtract 60 from both sides:
[tex]x=18[/tex]
So, the new dataset is
[tex]10,14,8,16,12,18[/tex]
If we remove one element, we will be left with a dataset of 5 elements. If we want the mean to be 14, the sum of the elements must be 14*5 = 70.
The sum of the 6 elements is 78, so we have to remove the 8. The new dataset will be
[tex]10,14,16,12,18[/tex]
and in fact the mean is
[tex]\dfrac{10+14+16+12+18}{5}=\dfrac{70}{5}=14[/tex]