For a day to repeat 5 times in a month and for it to not be on the first and last day of the month, the month has to have 31 days and the first repetition should happen on the 2nd of the month that way 2,9,16,23,30 will be Fridays where 1 and 31 aren't.
So after establishing this 13th is simply Tuesday by counting.