Law of cosines ssa