Students were asked to prove the identity (sec x)(csc x) = cot x + tan x.

Let's prove that (sec x)(csc x) is equal to cot x + tan x
[tex]\Longrightarrow \sf (sec(x) )(csc(x))[/tex]
[tex]\Longrightarrow \sf \dfrac{1}{\cos \left(x\right)\sin \left(x\right)}[/tex]
[tex]\Longrightarrow \sf \dfrac{\cos ^2\left(x\right)+\sin ^2\left(x\right)}{\cos \left(x\right)\sin \left(x\right)}[/tex]
[tex]\Longrightarrow \sf \dfrac{\cos ^2\left(x\right)}{\cos \left(x\right)\sin \left(x\right)} + \dfrac{\sin ^2\left(x\right)}{\cos \left(x\right)\sin \left(x\right)}[/tex]
[tex]\Longrightarrow \sf \dfrac{\cos\left(x\right)}{\sin \left(x\right)} + \dfrac{\sin \left(x\right)}{\cos \left(x\right)}[/tex]
[tex]\Longrightarrow \sf cot(x) + tan(x)[/tex]
Hence student A did correctly prove the identity properly.
Also Looking at student B's work, he verified the identity properly.
So, Both are correct in their own way.
Identities used:
[tex]\rightarrow \sf sin^2 (x) + cos^2 (x) = 1[/tex] (appeared in step 3)
[tex]\sf \rightarrow \dfrac{cos(x) }{sin(x) } = cot(x)[/tex] (appeared in step 6)
[tex]\rightarrow \sf \dfrac{sin(x )}{cos(x) } = tan(x)[/tex] (appeared in step 6)