Develop classification model, given the k nearest neighbors
If I understand you correctly, based on the data and the given nearest neighbors, you need to decide what distance calculation was used to determine the nearest neighbors.  It seems unlikely that you are being asked to create an altogether new distance measure, rather explore the different accepted distance measures.

If this is correct, it sounds like all you need to do is run the nearest neighbors recursively with different distance calculations and compare the results to the provided nearest neighbors to determine which measure created the 5 nearest neighbors you were given.