On @emilios's point, the quickest way to solve this is to use the fact that cos(x) and sin(x) are related to each other by shifting cos(x) to the right by 90 deg, i.e. cos(90-theta) = cos(theta-90) = sin(theta). And for the denominator, sin(90-theta) = cos(theta).
But this is stuff that you covered before Year 12, so it could be a little hazy. You can use the compound-angle results: cos(A-B) = cos(A)cos(B)+sin(A)sin(B) & sin(A-B) = sin(A)cos(B)-sin(B)cos(A), to arrive simply the numerator as:
cos(90)cos(theta)+sin(90)sin(theta) = sin(theta), since cos(90)=0 & sin(90)=1.
In the denominator,
sin(90)cos(theta)-sin(theta)cos(90) = cos(theta).
Hence, they divide out to give tan(theta).
If you'd like more practice of harder HSC-style questions, check out the Sci School HSC programs in the first week of the holidays. Sample notes showing the style of the lecture slides are online.