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
We want the mean to be 13, so we want
Multiply both sides by 6:
Subtract 60 from both sides:
So, the new dataset is
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
and in fact the mean is