Tom & Jerry are placed in a 16 square conjoined rooms as shown, where each of them stays in the opposite corner room at the start. However, these square rooms are so dark that neither of them can see anything even if they are in the same room. Still, in every 30 seconds, the lights in the rooms will all be turned on for a brief moment before going black out again.
To start the run, Jerry the mouse can move from one room to the next in up-down or left-right direction (no diagonals allowed) for one square only within the 30-second period before the lights go on.
To begin the hunt, Tom the cat can move 3 squares during that 30 seconds. However, he may not retrace his step immediately, nor can he keep on the same track for the adjacent move. For example, if he chooses to go up-down the square, he must choose to go right-left for the next move, and vise versa. (Again no diagonals are allowed, and even if Tom passes Jerry midway in the same dark room, Jerry will be run past unnoticed.)
Finally, if Tom and Jerry meet up in the same lit room after the proposed moves, the game is over (sadly for Jerry).
How many ways can Tom finish off this hunting game within 5 turns of lights on?