When a restaurant is in multiple markets whichever market has the highest delivery area by miles will be selected. 

Let's say market  A has max delivery distance of 5 miles and market B has a max delivery distance of 10 miles. In this case, the delivery charges will be picked from market B.

In the case both markets have the same delivery miles then it would pick any of them.