Understanding effect of ph on solubility of salt
Let assume we have the following equilibria:
$$\ce{MX \rightleftharpoons M+ + X-}$$
$$\ce{HX \rightleftharpoons H+ + X-}$$
The expression for their respective equilibrium constants are the following:
$$\mathrm{K_{sp} = [M^+][X-]}$$
$$\mathrm{K_a = \frac{[H^+][X^-]}{[HX]}}$$
We also know the following (let S be solubility):
$$\mathrm{S = [M^+] = [X^-]_{tot}}$$
Now we just need one more equation before we can start solving for S which is a mass balance. Since all the $\mathrm{X^-}$ that is produced either reacts with water to form $\mathrm{HX}$ or remains as $\mathrm{X^-}$, we get the following equation :
$$\mathrm{[X^-]_{tot} = [X^-] + [HX]}$$
Now lets put $\mathrm{[X^-]}$ and $\mathrm{[HX]}$ in terms of $\mathrm{[M^+]}$:
$$\mathrm{[X^-] = \frac{K_{sp}}{[M^+]}}$$
$$\mathrm{[HX] = \frac{[H^+][X^-]}{K_a} = \frac{K_{sp}[H^+]}{K_a[M+]}}$$
Now let plugs those values into our mass balance and replace $\mathrm{[X^-]_{tot}}$ and $\mathrm{[M^+]}$ with S:
$$\mathrm{[X^-]_{tot} = \frac{K_{sp}}{[M^+]} + \frac{K_{sp}[H^+]}{K_a[M+]}}$$
$$\mathrm{S = \frac{K_{sp}}{S} + \frac{K_{sp}[H^+]}{K_a\times S}}$$
$$\mathrm{S^2 = K_{sp} + \frac{K_{sp}[H^+]}{K_a}}$$
$$\mathrm{S = \sqrt{K_{sp} + \frac{K_{sp}[H^+]}{K_a}}}$$
This gives you the exact same expression as the one on the sheet but hopefully this is much clearer for you.