The Traveling Toothbrush
JavaScript (ES6), 65 bytes



f=([s,t],[u,v])=&gt;s&lt;3^u&lt;3?f(s+t,5-u+v)+2:s-u?t-+-v:t&lt;v?++v-t:++t-v

for(i=1;i&lt;5;i++)for(j=1;j&lt;9;j++){let o=document.createElement("option");o.text=""+i+j;s.add(o);t.add(o.cloneNode(true));}
&lt;div onchange=o.textContent=f(s.value,t.value)&gt;&lt;select id=s&gt;&lt;/select&gt;&lt;select id=t&gt;&lt;/select&gt;&lt;pre id=o&gt;1




Takes input as strings.