Exit[]

x1=Sin[a];y1=Sin[b];z1=Sqrt[Cos[a]^2+Cos[b]^2]
eq=Cos[a](x-x1)+Cos[b](y-y1)+Sqrt[Sin[a]^2-Cos[b]^2](z-z1)

eq1=D[eq,a];eq2=D[eq,b]

sol=Solve[{eq==0,eq1==0,eq2==0},{x,y,z}]

xx=x/.sol[[1]];FullSimplify[xx]