<s>[INST] Triangle-geometry problem Here is the question:

$\cos(A-B) = \frac{7}{8}$, $\cos(C) = ?$
By the Law of Cosines, I get:
$AB^2 = 41-40\cos(C)$
I also tried to expand $\cos(A-B)$ by the compound angle formula, getting:

*

*$\cos(A)\cos(B) + \sin(A)\sin(B)$
Which by the Law of Sines becomes:

*

*$\cos(A)\cos(B) + \frac{5}{4} \sin(B)^2 = \frac{7}{8}$
That's where I have been able to get so far. One thing though that has been bothering me is whether $AB =3$. I am tempted to go down that way because of the Pythagorean triple $3^2 + 4^2 = 5^2$. However, they have not specified that $\angle{A} = \frac{\pi}{2}$, so I am worried about wrongly assuming it. Any assistance would be greatly appreciated.
 [/INST] 
Draw $\angle BAD = \angle B$. Then $\angle CAD = \angle A - \angle B$. Say $\angle A - \angle B = \alpha$.
If $BD = x, AD = x, CD = 5 - x$.
Applying law of cosines in $\triangle CAD$,
$(5-x)^2 = x^2 + 4^2 - 2 \cdot 4 \cdot x \cdot \cos \alpha$
$25 + x^2 - 10 x = 16 + x^2 - 7x \implies x = 3$
We now know the sides of $\triangle CAD$. Applying law of cosines again, we find $ ~ \cos \angle C = \dfrac{11}{16}$.
</s>