Solving for missing side using cosine