<s>[INST] Show that scalene triangle $\triangle ABC$ is a right-triangle if $\sin(A)\cos(A)=\sin(B)\cos(B)$ As the title suggests, this is a college entrance exam practice problem from Japan, it is as follows:

Given a scalene triangle $\triangle ABC$, prove that it is a right triangle if $\sin(A)\cos(A)=\sin(B)\cos(B)$

I found this problem pretty interesting, and after some thinking, I found a way to solve it, and I'll show my attempt here. I want to know, are there any other/better ways to solve this? Or is there anything about my solution that can be improved? Please let me know!
Here's my attempt:
Some have that: $$\sin(A)\cos(A)=\sin(B)\cos(B)$$
From Law of Sines we know that:
$$\frac{a}{\sin(A)}=\frac{b}{\sin(B)}=\frac{c}{\sin(C)}=2R$$
And from Law of Cosines:
$$\cos(B)=\frac{a^2+c^2-b^2}{2ac}$$ $$\cos(A)=\frac{b^2+c^2-a^2}{2bc}$$
Therefore:
$$(\frac{a}{2R})(\frac{b^2+c^2-a^2}{2bc})=(\frac{b}{2R})(\frac{a^2+c^2-b^2}{2ac})$$
Dividing and multiplying by $a$ on the left side and by $b$ on the right side gives us:
$$\frac{(a^2)(b^2+c^2-a^2)}{4Rabc}=\frac{(b^2)(a^2+c^2-b^2)}{4Rabc}$$
$$a^2b^2+a^2c^2-a^4=a^2b^2+b^2c^2-b^4$$
$$(a^2-b^2)c^2-(a^2-b^2)(a^2+b^2)=0$$
$$(a+b)(a-b)(-a^2-b^2+c^2)=0$$
Now, obviously the case $a=-b$ cannot be true. We also know that $a=b$ does not work in this particular case since this triangle is scalene, therefore we're left with:
$$-a^2-b^2+c^2=0$$
$$a^2+b^2=c^2$$
And this proves that the triangle is right angled
 [/INST] Your method is correct.
If you can use trigonometric identities, proceed as follows:
$2\sin(A)\cos(A)=2\sin(B)\cos(B)$
$\sin(2A)=\sin(2B)$
Thus $2A$ and $2B$ are either equal or supplementary, so correspondingly $A$ and $B$ are equal or complementary. But equality of angles implies the triangle is isosceles, a contradiction; so $A$ and $B$ must be complementary from which the third angle ($\angle C$) has to measure $180°-90°=90°$ and thus the triangle is right.
</s>