Index the intersections with matrix notation, so $X=(3,3)$ and $Y=(5,7)$. Let $d_{i,j}$ be the shortest time from $(i,j)$ to $Y$. We want to compute $d_{3,3}$. By working backwards from $d_{5,7}=0$, we find the following values:
\begin{matrix}12&11&10&9&8&7&6&7&8\\11&10&9&8&7&8&5&6&7\\10&9&\color{green}{8}&7&6&7&4&5&6\\9&8&7&6&5&4&3&4&5\\8&7&6&5&4&3&\color{magenta}{0}&3&4\\7&6&5&4&3&2&1&2&3\\8&7&6&5&4&3&2&3&4\\\end{matrix}
In particular, the shortest distance from $X$ to $Y$ is
$d_{3,3}=8$.
To recover a shortest path from the table, start at $X$ and repeatedly select an outgoing neighbor $(i,j)$ with the smallest value of $d_{i,j}+\text{time to $(i,j)$}$:
\begin{matrix}.&.&.&.&.&.&.&.&.\\.&.&.&.&.&.&.&.&.\\.&.&\color{green}{8}&.&.&.&.&.&.\\.&.&7&6&.&.&.&.&.\\.&.&6&5&4&.&\color{magenta}{0}&.&.\\.&.&.&4&3&2&1&.&.\\.&.&.&.&.&.&.&.&.\\\end{matrix}