Which way should I use trigonometry in cases like these? And how to solve this question?

I have no problem with right angle triangles, but when it's not, I don't know how to use trigonometry. Because there are $2$ adjacent sides to each angle, I don't know which one to use.

The question is: A triangles sides are given by coordinates: $A(0,0), B(-2,4), C(4,5)$. I need to get the angles at each vertex. So I got the length of each side.
$AB$ is: $\sqrt{20}$
BC is: $\sqrt{37}$
AC is: $\sqrt{41}$

I used geogebra for the points, and I got the angles for them, and then I tried sin, cos, tan, none worked, then I tried the cosine function: $c^2=a^2+b^2-2ab\cos(C)$ But I still didn't get the answer.

Could anyone help with solving the question, and explaining in this case what rule to use? Also, how do I know which side is $c$, $a$ and $b$ when the triangle is not right-angled?

• The cosine rule you quoted should work. Choose an angle $C$ that you want to calculate, then make $c$ the side that is opposite this angle, and then $a$ and $b$ can be the other two sides. – John Doe Sep 28 '17 at 15:50
• By convention, $c$ is the length of $\overline{AB}$, $b$ is the length of $\overline{AC}$, and $a$ is the length of $\overline{BC}$. – N. F. Taussig Sep 28 '17 at 16:00
• Oh, so C could be anything I chose, as long as I use c for the opposite side? @JohnDoe – JohnFire Sep 28 '17 at 16:02
• @JohnFire yep, exactly :) – John Doe Sep 28 '17 at 17:23

By law of cosines $$\cos\measuredangle A=\frac{20+41-37}{2\sqrt20\sqrt{41}}=\frac{6}{\sqrt{205}}.$$ Thus, $$\measuredangle A=\arccos\frac{6}{\sqrt{205}}=65.22...^{\circ}.$$ $\measuredangle B$ and $\measuredangle C$ we can get by the similar way.
• Sonnhard, I wrote $...$ :). – Michael Rozenberg Sep 28 '17 at 16:01