Movement directions relate to the left-hand character.
The first set of movements need to be done together and quickly to avoid being hit by arrows and spawning ghosts.
Wait for an arrow to fire past, then quickly make the following movements -
Up x 2, Right x 2, Up x 2.
Left x 2 - do these in quick succession, as a ghost will spawn on the first space you step on.
Up x 2 after an arrow passes.
Left, then Up in quick succession to avoid more ghosts.
Left
Wait for arrows to pass, then quickly make the following movements -
Up x 2, Right x 2, Up to the exit.