The first thing I'd note is that grouping symbols are very important. You need to use them, in order to clearly communicate what you mean. In this case, I can guess that because you said you titled your post "Identity Problem," that the (unposted) instructions were something like "Prove the following is an identity." What you wrote is equal to the following, which is not an identity:
\(\displaystyle 1+cos^2\left(x\right)=1+\frac{sec^2\left(x\right)}{1}+tan^2\left(x\right)\)
What I'm pretty sure you meant is this, which is an identity: 1 + cos^2(x) = [1+cos^2(x)]/[1+tan^2(x)]
\(\displaystyle 1+cos^2\left(x\right)=\frac{1+sec^2\left(x\right)}{1+tan^2\left(x\right)}\)
That said, my actual advice for solving the problem is to recall the fundamental identities you already know. Start with the right-hand side of the equation. I see 1 + tan^2(x). Do you know an identity for this value? If not, try writing tan^2(x) is terms of sin^2(x) and cos^2(x), then manipulate the fractions until you see it. Once you make the appropriate substitution for 1+tan^2(x), simplify the resulting fraction.