i'm not sure im doing this right and im having trouble understanding this lesson

what i have is:

\cos\theta+\displaystyle{\frac{\sin^2\theta\}{\cos \theta}}

which would give me the correct answer but im worried i've done something incorrectly with the fractions

also i'm kind of new to this latex thing, but the third line was giving me a syntax error and i don't know what i did wrong exactly so i took the tags off