The measure of center that does NOT change when a value of 40 is inserted into both datasets is the median.
Are you sure
Apologies for the incorrect response. I made an error. Upon reevaluating the datasets, it is evident that the measure of center that does NOT change when a value of 40 is inserted into both datasets is the median.