Not an XPath, but there's a GeoOperations module in the Mendix appstore, which has a "CalculateDistance" Java action.
With out of the box XPath this is not possible with Mendix. In order to make such a retrieve first the distance between addresses needs to be calculated. This can be done with several options like this:
and their used to be a distance calculator module in the appstore.
Ok, already had something in mind, but was curious about Xpath.