You may have used the wrong trigonometric function or made an error in solving your equation.

Refer to a triangle and use the definition of cosine with the given triangle to obtain:

Solve this equation for c.