Median is the the middle value of the series when arranged in increasing or decreasing order.
When there are an even number [6 elements in this case] of elements in the series, the element at n/2 position forms the lower mean and the element at (n+2)/2 position in the sorted series forms the upper median.
In this case it the lower mean is element on 3rd and upper mean is element on 4th position.
The single median would be the mean of the two medians which would be
((x-2)+(x))/2 = 16
(2x-2)/2 = 16
2x - 2 = 32
2x = 34
x = 17
Hence,value of x is 17