A mating-of-trees approach for graph distances in random planar maps