For a start C ought to be 59: if H goes from 39 to 79 then the point in the middle where cos Bt = 0 is when C = 59.

Next, note that the time starts when H is at its lowest. Thus when t = 0, H = 59 - 20 cos (0) (note that minus sign). So A will have to be -20, not 20.

Next note that your period is 24 not 12 - 12 hours is *half* the period.

means , means so and so .

Draw a graph - it may clarify things.