<s>[INST] If $\cos3A + \cos3B + \cos3C = 1$ in a triangle, find one of its length I would like to solve the following problem.

In $\triangle ABC, AC = 10, BC = 13$. If $\cos3A + \cos3B + \cos3C = 1$, compute the length of $AB$.

I thought that I could apply the Law of Cosines. Using the fact that $A+B+C=\pi$, I attempted to build the equation up from there.
What I got was that $$\cos3A+\cos3B-\cos(3A+3B)=1$$
Expanding, I got $$\cos3A+\cos3B-\cos3A\cos3B-\sin3A\sin3B=1$$
Now, it's possible that I'd be able to factor it somehow by rewriting it all in terms of cosine and arrive at the answer, but is there a better way to solve the problem? Thanks!
 [/INST] $\mathbf {Hint...}$
$$\cos {3A}+\cos {3B}+ \cos{3C}=1$$
$$\Rightarrow 4 \sin {\frac {3C}{2}} .\sin {\frac{3B}{2}} .\sin{\frac{3A}{2}}=0$$
Hence the largest angle of triangle is $\frac{2\pi}{3}$ which can be either angle $C$ or angle $A$. By applying cosine rule in each of these cases we get the value of $AB$ as $\sqrt {399}$ or $\sqrt {94}-5$ respectively.
Note: 
$$\cos {3A}+\cos {3B}+ \cos{3C}=1$$
$$\Rightarrow -2\cos {\frac {3(A-B)}{2}}\sin {\frac {3C}{2}}- 2\left(\sin  {\frac {3C}{2}}\right)^2=0$$
$$=\sin\frac{3C}{2}\left(\cos\frac{3(A-B)}{2}+ \sin\frac{3C}{2}\right)=0$$ 
$$\sin\frac{3C}{2}\left(\cos\frac{3(A-B)}{2}-\cos\frac{3(A+B)}{2}\right)=0$$
$$\sin\frac{3C}{2}\sin\frac{3B}{2}\sin\frac{3A}{2}=0.$$
</s>