Calculate distance between 2 trees