There are often questions about the long and short vowels in the Czech language. It is uneasy to give students the patterns and rules to follow, which come out of a long row of forms and models.
Good news is that in verbal infinitives, we are able to define one scheme:
there is almost always a long vowel in one-syllable infinitive and its prefix variants (hrát, vyhrát, pít, vypít).
Note, that two- or more- syllable verbs usually have short last vowel: pracovat, udělat, telefonovat.
Exceptions are as follows: smět, pět (archaic version of pít), psát x napsat.
Anyway, it is always better to check the correct version on http://prirucka.ujc.cas.cz/.