solve x= l*sqrt(a^2-1)/(a-p) and z=l*sqrt(1-p^2)/(a-p) for a,p