The Law of Cosines states that for a triangle with sides a, b, and c and with angle C opposite side c, the relationship between the sides and the cosine of the angle is:
c^2 = a^2 + b^2 - 2ab * cos(C)
Since the triangle is a right triangle, we can use the Pythagorean theorem to find the value of the angle.
For ∠A:
c^2 = a^2 + b^2 - 2ab * cos(A)
9^2 = 5^2 + 7^2 - 257 * cos(A)
81 = 25 + 49 - 70 * cos(A)
81 = 74 - 70 * cos(A)
81 - 74 = -70 * cos(A)
7 = -70 * cos(A)
cos(A) = -7/70
A = arccos(-7/70)
For ∠B:
a^2 = b^2 + c^2 - 2bc * cos(B)
5^2 = 7^2 + 9^2 - 279 * cos(B)
25 = 49 + 81 - 98 * cos(B)
25 = 130 - 98 * cos(B)
130 - 25 = 98 * cos(B)
105 = 98 * cos(B)
cos(B) = 105/98
B = arccos(105/98)
For ∠C:
b^2 = a^2 + c^2 - 2ac * cos(C)
7^2 = 5^2 + 9^2 - 259 * cos(C)
49 = 25 + 81 - 90 * cos(C)
49 = 106 - 90 * cos(C)
106 - 49 = 90 * cos(C)
57 = 90 * cos(C)
cos(C) = 57/90
C = arccos(57/90)
Keep in mind that the values of the angle are in radians.
Please note that the triangle does not have to be a right triangle, the Law of Cosines works for any triangle.