If m is a root of x^3-px^2-r = 0 ,then we have
m^3-pm^2-r = 0 \Rightarrow m^3 = pm^2+r \Rightarrow m^6 - (pm^2+r)^2 = 0
Setting t = m2, t is a root of the equation z^3-(pz+r)^2 = 0
From this we see that \tan^2 \alpha, \tan^2 \beta, \tan^2 \gamma are the roots of the above cubic.
Now
(1+\tan^2 \alpha) (1+ \tan^2 \beta)(1+ \tan^2 \gamma) \\ \\ = -(-1-\tan^2 \alpha) (-1- \tan^2 \beta)(-1- \tan^2 \gamma)= -P(-1)
where P(z) = z^3-(pz+r)^2
Then we have -P(-1) = (1+(p-r)^2)