You did not constrain anything!!
The format of the restriction should be
if sin(h) = (something here) then what is cos(h)
I think you didnt get what he meant....
He wants to express cos(h) using sin(h)
Using the identity cos2(h)+sin2(h)=1
Cos2(h)=1-sin2(h)
Then cos(h)=(1-sin2(h))1/2 OR -1*(1-sin2(h))1/2
IN DEGREES
if -90<=h<=90 then its the first option
if 90
IN RADIANS
if -π/2<=h<=π/2 then its the first option
if π/2