That's the right answer! And that's one reason it's so nice to have \$$\infty\$$ in our set of "costs" (or "times").

So, I invite others to answer the second part of the question! I was very sloppy about the definition of \$$\mathcal{X}(x,y)\$$. If we do it carefully, the answer "\$$\infty\$$" should pop out in this case _automatically_, without any special extra rule.