Making Heuristic State Space Search Optimal

Recall the example search tree shown below.

Q: How can we discover state J-as-a-descendant-of-C before we discover J-as-a-descendant-of-B?