I'm stuck on this question...

I've tried expressing tan^2 (x/2) as a function of tan x and tan x/2, then substituting for cos/sin but that doesn't seem to work (unless I've done the algebra wrong...) can anyone give me some pointers please?

Identities here: