Use the law of cosines and law of sines to solve triangles