These two tunes are both in G Major and coincidentally have the same three notes at the beginning.
The first part of Castlebar Races is played in open position, the second part almost entirely in third position; that is the first finger is positioned at the third fret. It is also used to play any F# notes (2nd fret, 1st string). Where you have consecutive F# / G notes use your first finger for both.
For Mouse In The Mug you’ll find something similar. The first part of the tune is open position. For the second part of the tune Tony has written it out as a 16 bar section with no repeats. The first twelve bars of this section can be played in third position, using your first finger playing any notes occurring on the second fret of 1st string (F#) and 3rd string (A) and then reverting to open position for the last four bars. In fact the last four bars of the tune are identical to the last four bars of the first section.