Copyright © University of Cambridge. All rights reserved.
'Crawl Around the Cube' printed from https://nrich.maths.org/
At Q the ant can choose first to go left to T, then right to W.
Otherwise, at Q it can go right to R and then left to W.
W is the corner diagonally opposite to P and is reached by either route after three edges (and no fewer).
So after exactly three more edges, the ant must reach the corner opposite W, that is, P.
So the ant will return to P after travelling along 6 edges.