The 6 that leave it on top come from the symmetry group of the equilateral triangle. There is the identity, a 1/3 rotation around the vertical axis through the center of the triangle (the dotted red line), a 2/3 rotation around the vertical axis through the center of the triangle, and three mirror reflections in vertical mirror planes passing through the 3 red lines drawn in the top triangle.
The 6 that move the top triangle to the bottom come from composing a mirror reflection in the horizontal plane halfway up the sides of the prism with the 6 symmetries already listed. The identity composed with this is just a mirror reflection, the two rotations composed with it are rotary reflections. The mirror reflections composed with it are 1/2 turn rotations around horizontal axes which pass through the center of one square side of the prism and through the midpoint of the opposite edge.
The 10 that leave it on top come from the symmetry group of the regular pentagon. There is the identity, a 1/5, 2/5, 3/5 and 4/5 rotation around the vertical axis through the center of the pentagon (the dotted red line), and 5 mirror reflections in vertical mirror planes passing through the 5 red lines drawn in the top pentagon.
The 10 that move the top pentagon to the bottom come from composing any one symmetry that moves the top pentagon to the bottom with the 10 symmetries already listed. The one symmetry that I will use is a rotary reflection with the reflection plane a horizontal plane halfway up the sides of the antiprism and the rotation a 1/10 rotation about the vertical axis through the center of the pentagons. The identity and the four rotations composed with this are all rotary reflections. The mirror reflections composed with it are 1/2 turn rotations around horizontal axes which pass through the center of opposite edges on the sides of the antiprism.
Each face of the octahedron has 6 other faces joined to it and 1 face opposite to it. If we use four colors, coloring opposite faces the same color, then all the faces around each corner will be different colors.
Any symmetry of the octahedron sends pairs of opposite faces to other pairs of opposite faces. Therefore, faces colored the same will move to faces colored the same.