Let t=tanθ, then sec2θ=1+t2 and:
√(1+t2)-t=p, √(1+t2)=p+t. Squaring:
1+t2=p2+2pt+t2, p2+2pt=1, t=tanθ=(1-p2)/2p.
In a right triangle tanθ=opposite/adjacent=(1-p2)/2p.
Therefore the hypotenuse2=(1-p2)2+4p2=(1+p2)2.
So the hypotenuse = 1+p2. sinθ = opposite/hypotenuse = (1-p2)/(1+p2);
cosθ = adjacent/hypotenuse=2p/(1+p2); secθ=(1+p2)/2p.
CHECK
secθ-tanθ=(1+p2)/2p-(1-p2)/2p=(1+p2-(1-p2))/2p=2p2/2p=p OK.