Case : Both in tail. Check if is reachable from by jumping. If not, no path exists. If yes, compute distance by simulation or binary search with binary lifting. Case : in tail, in cycle. Jump from to cycle, then compute steps around cycle to .
Use cycle positions. Case : Both in cycle. Compute steps around the cycle from to using . Case : in cycle, in tail. No path exists because you cannot leave a cycle.