Relevant figure is not given, but I guess fig.1 is drawn as per the requirement of this question.
Electric flux through the given surface due to given charge configuration is obtained using Gauss theorem .
Total electric flux over the surface of encosure =
where integration is done over the surface area of enclosure, E is electric field at a small surface elelemt dA,
q is the total charge inside the enclosure and ε is the electric permeability of the medium inside enclosure.
Flux calculation over the surface is simplified if enclosure is symmetrical with the the enclosed charge.
Hence to get flux through face ABCD as shown in fig.1, we make an imaginary enclosure using
8 identical cubes as shown in figure 2 so that charge q is centrally located.
Now the total flux over the surface of imaginary enclosure is ( q/ε ) V/m .
Since the flux over the surface is uniform, flux through face ABCD = (q/ε)×[a2/(24a2)] = q/(24ε) V/m ........................(1)
When the charge is shifted to the centroid of cube as shown in fig.3,
now total flux over the surface of cube is ( q/ε ) V/m .
Hence flux through the face AEHD = (q/ε)×[a2/(6a2)] = q/(6ε) V/m ..........................(2)
If we assume the electric flux given in eqn.(1) as x V/m and that of eqn.(2) as kx V/m , then we get k = 4