The part where you went wrong is that the Law of Cosine you used isn't correct.

It should be ab.

Let A, B, and C be the vertices of a triangle and a, b, and c be the sides of the same triangle. Side a is opposite vertex A, side b is opposite vertex B, side c is opposite vertex C.

The Law of Cosines state that: