Flux through side of a cube
Contrary to what queueoverflow says, you do not actually need to perform any integration here; a pretty cool symmetry argument will give you the answer.
Let the cube we are considering in the problem have side length $\ell$.
The trick is to consider putting the charge at the center of an imaginary cube of side length $2\ell$. The flux through the surface of this cube is just $q/\epsilon_0$ by Gauss's Law since it is a closed surface containing the charge. Now imagine dividing each face of this larger cube into four squares of side length $\ell$. By symmetry, the flux through each of these squares is the same, but there are a total of 24 such squares since there are six faces, so the flux through each of these squares is $q/(24\epsilon_0$).
Now, simply notice that if we were to cut the larger cube into eight cubes of side length $\ell$, then each of these squares mentioned in the last paragraph would be a face of one of these cubes at which the charge is at a corner. QED.
Regarding your confusion. Notice that a bunch of the flux coming from the charge does not even pass through the faces of the cube when the charge is at its corner. Only one eighth of its total flux goes through the faces of the cube as illustrated by the argument above. Then, each of the three faces opposite the charge get one third of this flux because the other three faces next to the charge are parallel to the electric field, so there is no flux through them.