Here we have 2 linear equations in sec and tan. (you can take sec = x and tan = y for simplicity sake).
Then they solved the 2 linear equations using cross multiplication method.
Refer to the link below to understand cross multiplication method to solve linear equations in 2 variables.
You can use any method to solve for tan and sec.
We have,
a secθ+btanθ+c=0
And p secθ+q tanθ+r=0
Solving these two equations by the cross-multiplication for secθ and tanθ we get
secθbr−qc=tanθcp−ar=1aq−bp⇒secθ=br−cqaq−bp and tanθ=cp−araq−bp
sec2θ−tan2θ=1
⇒(br−cqaq−bp)2−(cp−araq−bp)2=1⇔(br−cq)2−(cp−ar)2=(aq−bp)2
Then they used the identity sec2−tan2=1
Substitute values of sec and tan to get the required results.