The system can be written as
$\phi (r,\theta)
=\frac{1}{4\pi \epsilon_0}[\frac{Q}{|r-d|}+\frac{Q_i}{|r-d_i|}]
$
Now for $r=a$ we want
$
0=\phi (r=a,\theta)
=\frac{1}{4\pi \epsilon_0}[\frac{Q_i}{|a-d_i|}+\frac{Q}{|a-d|}]\\
\Rightarrow Q^2|a-d_i|^2=Q_i^2|a-d|^2\\
\Leftrightarrow Q^2(a^2+d_i^2-2ad_i\cos(\theta))=Q_i^2(a^2+d^2-2ad\cos(\theta))\\
\Leftrightarrow Q^2(a^2+d_i^2)-Q_i^2(a^2+d^2)=2a\cos(\theta)(Q^2d_i-Q_i^2d)
$
We would like the induced charge to be homogeneous on the sphere $\phi (r=a,\theta)=\phi (r=a)$ so we need that
$Q^2d_i-Q_i^2d=0\quad (1)\Rightarrow Q^2(a^2+d_i^2)-Q_i^2(a^2+d^2)=0\quad (2)$
therefore
$0=_{2}(a^2+d_i^2)-\frac{Q_i^2}{Q^2}(a^2+d^2)\\
=_{1}(a^2+d_i^2)-\frac{d_i}{d}(a^2+d^2)\\
=d_i^2-\frac{(a^2+d^2)}{d}d+a^2\\
=(d_i-\frac{a^2}{d})(d_i-d)
$
The solution $d_i=d$ is outside the sphere right over the other charge so instead we take $d_i=\frac{a^2}{d}$ which implies $Q_i=\pm\frac{a}{d}Q$ but both charges can't be positive so we take $Q_i=-\frac{a}{d}Q$
Notice that this means we have $d_id=a^2$ which is called also an sphere inversion $OP\times OP^{\prime} =r^2$ (if we where working in $\mathbb{C}$ instead of $\mathbb{R^2}$ this is would read as $z\overline{z}=\|z\|$) and further can be read at the wikipedia article for the image method
Putting this back in our system we get
$\phi (r,\theta)\\
=\frac{1}{4\pi \epsilon_0}[\frac{Q}{|r-d|}+\frac{Q_i}{|r-d_i|}]\\
=\frac{Q}{4\pi \epsilon_0}[\frac{1}{|r-d|}+\frac{-a/d}{|r-a^2/d|}]\\
=\frac{Q}{4\pi \epsilon_0}[\frac{1}{|r-d|}+\frac{-1}{|rd/a-a|}]\\
=\frac{Q}{4\pi \epsilon_0}[\frac{1}{\sqrt{r^2+d^2-2rd\cos(\theta)}}+\frac{-1}{\sqrt{r^2d^2/a^2+a^2-2rd\cos(\theta)}}]\\
$
The derivative evaluated at $r=a$ gives
$\phi_r (r,\theta)|_{r=a}\\
=\frac{Q}{4\pi \epsilon_0}[-\frac{d\cos(\theta)-r}{(r^2+d^2-2rd\cos(\theta))^{3/2}}+\frac{d\cos(\theta)-rd^2/a^2}{r^2d^2/a^2+a^2-2rd\cos(\theta))^{3/2}}]|_{r=a}\\
=\frac{Q}{4\pi \epsilon_0}[-\frac{d\cos(\theta)-a}{(a^2+d^2-2ad\cos(\theta))^{3/2}}+\frac{d\cos(\theta)-d^2/a}{(d^2+a^2-2ad\cos(\theta))^{3/2}}]\\
=\frac{Q}{4\pi \epsilon_0}[\frac{a^2-d^2}{a(d^2+a^2-2ad\cos(\theta))^{3/2}}]\\
$
Finally we want the total charge on the surface:
$Q_{\text{total}}=\int\sigma(\theta)d\Omega\\
=\int_{-\pi}^{\pi}\int_0^{\pi}\epsilon_0\phi_r(r=a,\theta)a^2\sin(\theta)d\theta d\varphi\\
=\int_{-\pi}^{\pi}\int_{0}^{\pi}\epsilon_0(\frac{Q}{4\pi \epsilon_0}[\frac{a^2-d^2}{a(d^2+a^2-2ad\cos(\theta))^{3/2}}])a^2\sin(\theta)d\theta d\varphi\\
=\frac{a(a^2-d^2)Q}{4\pi}\int_{-\pi}^{\pi}d\varphi\int_{-\pi}^{\pi}[\frac{\sin(\theta)}{a(d^2+a^2-2ad\cos(\theta))^{3/2}}]d\theta\\
=\frac{a(a^2-d^2)Q}{2}\int_{0}^{\pi}[\frac{\sin(\theta)}{(d^2+a^2-2ad\cos(\theta))^{3/2}}]d\theta\\
=\frac{a(a^2-d^2)Q}{2}[\frac{1/ad}{\sqrt{d^2+a^2-2ad\cos(\theta)}}]|_{0}^{\pi}\\
=\frac{(a^2-d^2)Q}{2d}[\frac{1}{\sqrt{d^2+a^2-2ad}}-\frac{1}{\sqrt{d^2+a^2+2ad}}]\\
=\frac{(a^2-d^2)Q}{2d}[\frac{1}{\sqrt{(d-a)^2}}-\frac{1}{\sqrt{(d+a)^2}}]\\
=\frac{(a^2-d^2)Q}{2d}[\frac{1}{(d-a)}-\frac{1}{(d+a)}]\\
=\frac{(a^2-d^2)Q}{2d}[\frac{2a}{(d^2-a^2)}]\\
=\frac{-aQ}{d}\\
$
Where the factor $\frac{-a}{d}$ represents the fraction of charge induced by the particle at distance $d$ over the sphere of radius $a$