The charge is at $A$ in the medium 1 and has an image point at $A^{\prime}$ in the medium $2 .$ The electric field in the medium 1 is due to the actual charge $q$ at $A$ and the image charge $q^{\prime}$ at $A^{\prime} .$ The electric field in 2 is due to a corrected charge $q^{\prime}$ at $A .$ Thus on the boundary between 1 and 2 ,
$E_{1 n}=\frac{q^{\prime}}{4 \pi \varepsilon_{0} r^{2}} \cos \theta-\frac{q}{4 \pi \varepsilon_{0} r^{2}} \cos \theta$
$E_{2 n}=\frac{-q^{\prime \prime}}{4 \pi \varepsilon_{0} r^{2}} \cos \theta$
$E_{1 t}=\frac{q^{\prime}}{4 \pi \varepsilon_{0} r^{2}} \sin \theta+\frac{q}{4 \pi \varepsilon_{0} r^{2}} \sin \theta$
$E_{2 t}=\frac{q^{\prime \prime}}{4 \pi \varepsilon_{0} r^{2}} \sin \theta$
The boundary conditions are $D_{1 n}=D_{2 n}$ and $E_{1 t}=E_{2 t}$
$\varepsilon q^{\prime \prime}=q-q^{\prime}$
$q^{\prime \prime}=q+q^{\prime}$
So, $q^{\prime \prime}=\frac{2 q}{\varepsilon+1}, q^{\prime}=-\frac{\varepsilon-1}{\varepsilon+1} q$
(a) The surface density of the bound charge on the surface of the dielectric
$$
\begin{aligned}
\sigma^{\prime} &=P_{2 n}=D_{2 n}-\varepsilon_{0} E_{2 n}=(\varepsilon-1) \varepsilon_{0} E_{2 n} \\
&=-\frac{\varepsilon-1}{\varepsilon+1} \frac{q}{2 \pi r^{2}} \cos \theta=-\frac{\varepsilon-1}{\varepsilon+1} \frac{q l}{2 \pi r^{3}}
\end{aligned}
$$
(b) Total bound charge is, $-\frac{\varepsilon-1}{\varepsilon+1} q \int_{0} \frac{l}{2 \pi\left(l^{2}+x^{2}\right)^{3 / 2}} 2 \pi x d x=-\frac{\varepsilon-1}{\varepsilon+1} q$