Answer
See the detailed answer below.
Work Step by Step
$$\color{blue}{\bf [a]}$$
In this problem, we aready have the way to work on it since the author told us how to do it. We just need to follow the instruction given by the author.
Refering to the given figure of CP27.55,
$$d\Phi=\vec E\cdot d\vec A$$
where $\vec E$ is dut to an infinite line of charge at a distance $r$ from the line charge,
$$d\Phi=\dfrac{1}{4\pi \epsilon_0}\dfrac{2\lambda}{r}\hat r\cdot d\vec A$$
where $d\vec A=Ldy\;\hat i$ which is for the black slide in the given figure, it is pointing toward $+x$-direction.
$$d\Phi=\dfrac{1}{4\pi \epsilon_0}\dfrac{2\lambda}{r}\hat r\cdot Ldy\;\hat i$$
where $r=\sqrt{x^2+y^2}$ where $x=\frac{1}{2}L$ since the wire is passing through the center of the box, so $r=\sqrt{(L^2/4)+y^2}$
$$d\Phi=\dfrac{1}{4\pi \epsilon_0}\dfrac{2\lambda}{\sqrt{(L^2/4)+y^2}}\hat r\cdot Ldy\;\hat i$$
$$d\Phi=\dfrac{1}{4\pi \epsilon_0}\dfrac{2\lambda Ldy}{\sqrt{(L^2/4)+y^2}}(\hat r\cdot \;\hat i)$$
$$d\Phi=\dfrac{1}{4\pi \epsilon_0}\dfrac{2\lambda Ldy}{\sqrt{(L^2/4)+y^2}}\cos\theta$$
where $\theta$ is the angle betwee $\hat i$ and $\hat r$ and hence, $\cos\theta=\dfrac{\frac{1}{2}L}{r}=\dfrac{\frac{1}{2}L}{\sqrt{(L^2/4)+y^2}}$, see the figure below.
$$d\Phi=\dfrac{1}{4\pi \epsilon_0}\dfrac{2\lambda Ldy}{\sqrt{(L^2/4)+y^2}}\dfrac{\frac{1}{2}L}{\sqrt{(L^2/4)+y^2}}$$
$$\boxed{d\Phi=\dfrac{1}{4\pi \epsilon_0}\dfrac{\lambda L^2dy}{ \left[(L^2/4)+y^2\right] } }$$
$$\color{blue}{\bf [b]}$$
$$\int d\Phi=\int_{-0.5L}^{0.5L} \dfrac{1}{4\pi \epsilon_0}\dfrac{\lambda L^2dy}{ \left[(L^2/4)+y^2\right] }$$
$$ \Phi=\dfrac{\lambda L^2}{ (4\pi \epsilon_0)}\int_{-0.5L}^{0.5L} \dfrac{ dy}{ (L^2/4)+y^2 }$$
$$\Phi=\dfrac{\lambda L^2}{ (4\pi \epsilon_0)}\dfrac{1}{(L /2)}\left[ \tan^{-1}\left(\dfrac{y}{(L/2)} \right) \right]_{-0.5L}^{0.5L} $$
$$\Phi=\dfrac{2\lambda L }{ (4\pi \epsilon_0)} \left[ \tan^{-1}\left(\dfrac{2y}{ L } \right)\right]_{-0.5L}^{0.5L} $$
$$\Phi=\dfrac{2\lambda L }{ (4\pi \epsilon_0)} \left[ \tan^{-1}\left(\dfrac{2(0.5L)}{ L } \right)-\tan^{-1}\left(\dfrac{2(-0.5L)}{ L } \right)\right] $$
$$\Phi=\dfrac{2\lambda L }{ (4\pi \epsilon_0)}\overbrace{ \left[ \tan^{-1}\left(1 \right)-\tan^{-1}\left(-1 \right)\right]}^{=\pi/2} $$
$$\Phi=\dfrac{ \pi \lambda L }{ (4\pi \epsilon_0)} $$
$$\boxed{\Phi=\dfrac{ \lambda L }{ 4 \epsilon_0 } } $$
$$\color{blue}{\bf [c]}$$
The net flux through the box will be from 4 faces since the electric field on the top and the bottom of the box, according to symmetry, is zero.
Thus,
$$\Phi_{net}=4\phi$$
Plug from the boxed formula in part (b),
$$\Phi_{net}=\dfrac{ 4 \lambda L }{ 4 \epsilon_0 } $$
where $\lambda=\dfrac{Q}{L_{\rm wire}}=\dfrac{Q_{in}}{L}$,
$$\boxed{\Phi_{net}=\dfrac{ Q_{in}}{ \epsilon_0 }} $$
where $Q=Q_{in}$ since we are dealing with the length of the cube not the whole wire