You may have 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.