I am answering your original question:

If sec θ + tan θ = x then cos θ=?

SOLUTION:

sec θ + tan θ = x

∴1/cosθ + sinθ/cosθ = x

∴(1+sinθ)/cosθ = x

∴1+sinθ = x cosθ ----------- (1)

Now, we know that

sin²θ + cos²θ = 1

∴cos²θ = 1 - sin²θ

∴cos²θ = (1+sinθ)(1-sinθ) [∵a² - b² = (a+b)(a-b) ]

∴cos²θ = x cosθ (1-sinθ) [From (1) ]

∴cos²θ/x cosθ = 1-sinθ

∴cosθ/x = 1 - sinθ

∴sinθ = 1 - cosθ/x ----------------------- (2)

From (1), we know

1 + sinθ = x cosθ

∴1 + 1 - cosθ/x = x cosθ [From (2) ]

∴2 - cosθ/x = x cosθ

∴(2x - cosθ) / x = x cosθ

∴ 2x - cos θ = x² cosθ

∴2x = x² cosθ + cosθ

∴2x = cosθ (x²+1)

∴2x / (x²+1) = cosθ

∴ cos θ = 2x/(x²+1)

Please note that I have used brackets for denoting common denominators. Where I have not used brackets, it means the denominator is for a single term only.