A regular octagon has 8 sides, so it would coincide exactly each time the vertices fall into the same places. In one full 360-degree rotation, any "selected" vertex would fall into all 7 other vertices one after the other, before going back to its original position. Therefore, there would be 8 times during the rotation that the octagon coincides with the preimage.
The probability of <em>only</em> a heads on a coin is 1/2, and the probability of <em>only</em> a 3 on a die is 1/6. Multiply them together, and you get 1/6.