$\displaystyle \phi(a)=\phi(pq)=(p-1)(q-1)=pq-p-q+1=a-p-q+1$
So
$\displaystyle a-\phi(a)-1=(p-1)+(q-1)$
Now forget this problem for a second and suppose $\displaystyle m=cd, n=c+d$; then we can find $\displaystyle c,d$ by solving for the roots of the quadratic $\displaystyle x^2-n+m$; so we have $\displaystyle \{c,d\}\: =\frac{n \pm \sqrt{n^2-4m}}{2}$.
Now put $\displaystyle m=(p-1)(q-1)=\phi(a)$
$\displaystyle n=(p-1)+(q-1)=a-\phi(a)-1$
and you get
$\displaystyle \{p-1,q-1\}=\frac{a-\phi(a)-1 \pm \sqrt{(a-\phi(a)-1)^2-4\phi(a)}}{2}$