Cosine rule: find a side